A small, non-validating XML parser.
It is deliberately lenient and lossless enough to round-trip the parts of an
Open Office XML package sablon touches: the XML declaration, processing
instructions, comments, CDATA sections and namespace-prefixed element names
are all preserved verbatim.
Summary
Functions
Decodes the five predefined XML entities plus numeric character references.
Parses an XML fragment. Namespace prefixes that are not declared in the
fragment are kept as part of the element name, exactly like Nokogiri's
XML.fragment/1 does.
Parses a complete XML document.
Parses binary into a simple tree of tuples without materialising a
document. Mostly useful for testing the parser itself.
Functions
Decodes the five predefined XML entities plus numeric character references.
@spec fragment(binary()) :: Sablon.XML.Document.t()
Parses an XML fragment. Namespace prefixes that are not declared in the
fragment are kept as part of the element name, exactly like Nokogiri's
XML.fragment/1 does.
@spec parse(binary()) :: Sablon.XML.Document.t()
Parses a complete XML document.
Parses binary into a simple tree of tuples without materialising a
document. Mostly useful for testing the parser itself.