Expand description
Minimal XML parser that turns well-formed XML markup into a generic element tree.
This is deliberately not a full XML spec implementation. It covers the
structural subset that embedded documents (notably SVG) actually use:
element/attribute/name constructs, self-closing tags, processing
instructions (<?...?>), comments, and <!DOCTYPE ...> prologs. Element
and attribute names are case-sensitive, and namespace prefixes are kept as
literal name characters (svg:path), matching XML semantics rather than
the HTML parser’s case-insensitive handling.
The parser is a thin tree-builder over super::tokenizer::Tokenizer,
reusing the shared HTML tokenizer for low-level lexing so that attribute
value quoting, comment syntax, entity decoding, and whitespace handling
all follow a single well-tested implementation.
Structs§
- XmlElement
- A parsed XML element: its (case-sensitive, possibly namespace-qualified) tag name and its attribute list.
Functions§
- parse
- Parses XML markup into an element tree.