Expand description
Post-processing document wrapper with XML/DOM, ID management, and caching.
Port of LaTeXML::Post::Document.
Wraps an XML::LibXML::Document (via the libxml crate) and provides:
- Namespace management
- ID tracking (idcache, reusable, reserved)
- XPath queries with registered namespaces
- Node manipulation (addNodes, removeNodes, cloneNode, etc.)
- Persistent cache (key-value store)
Structs§
- Post
Document - Post-processing document: wraps an XML document with ID management, namespace tracking, XPath helpers, and a persistent cache.
- Post
Document Options - Options for creating a PostDocument.
Enums§
- Conjunction
- Conjunction for joining node lists.
- Node
Data - Recursive representation for building XML nodes.
- XMBranch
- Which branch of an
ltx:XMDualto follow — Perl’s$branchstring argument torealizeXMNode, which is only ever'content'or'presentation'.
Constants§
- LTX_
NSURI - The LaTeXML namespace URI.
Functions§
- element_
children - Get element children of a node (skipping text, comments, etc.).
- element_
children_ iter - Iterator version of
element_children— walks the sibling chain lazily. Prefer this in hot paths that only need to read or filter children without materializing a Vec. Callers that need len() or random access still want the Vec version. - escape_
xml - Escape a string for XML text content or a double-quoted attribute value.
- get_
xml_ id - Get the xml:id attribute value from a node. Handles both namespace-aware and plain attribute access.