02 XML catalogs (WebDAV, OPDS, anything XML) (2/2)
Rules the parser applies (FreeInk SDK XmlListParser):
- A row without a url is dropped. A row with an empty title gets the url's last path segment as its title.
- An item is a folder when it contains the container_element anywhere inside it. extensions filters only files. Folders are always shown.
- resolve_urls: true turns /path and relative links (sub/index.xml) into full URLs, resolved against the folder of the XML being browsed. .. is not normalised.
- Query strings only survive in absolute links. When a relative or /path link is resolved, ?, = and & are percent-encoded: /api/notes?folder=12 becomes /api/notes%3Ffolder%3D12. Dynamic servers should either use path-style URLs (/api/folders/12/index.xml) or return absolute URLs (https://host/api/notes?folder=12).
- extensions checks the end of the URL's path, including any query string. https://host/note?id=7 never matches .md. Use a path that ends in the extension (/notes/7/export.md), or leave out extensions.
- Items nested inside another item are ignored. Each folder is its own request.
- Limits: 200 entries, 768 characters per field, about 64 KB of captured field text, and 32 levels of XML element nesting per response.
Behavior: Confirm on a folder fetches its url and lists it, and Back goes up (any depth). Folders are listed first, then files, each sorted A-Z. You can't choose the order. No paging, lists, search or Details screen.