A generic XML element: a name, an ordered attribute list, an ordered child list, and the source span it occupies.
Nothing here knows what any name means. The element is whatever the XML
said - no validation, no namespace resolution - and giving it meaning is
the lowering pass's job (docs/architecture.md, "Parser: DOM first, then
lowering"). Nothing on the element itself is normalized either; the one
normalization the parser does perform is XML 1.0 3.3.3 on attribute
values, which an XML processor owes its application before a value
exists at all (ADR-0043) - see Statifier.Parser.DOM.Attribute.
nameis the raw qualified name exactly as it appeared, prefix included.attributesare in document order, with duplicates preserved: a document that declares the same attribute twice is a thing the validator gets to report, so the parser may not silently drop one of them.childrenare in document order and interleave elements withStatifier.Parser.DOM.Text, so mixed markup is representable. Whitespace-only text is a child like any other;Statifier.Parser.DOM.elements/1is the filter for readers that do not want it.locationspans from the<of the start tag to the byte after the>of the end tag (for a self-closing element, the tag itself).
Summary
Types
@type child() :: t() | Statifier.Parser.DOM.Text.t()
@type t() :: %Statifier.Parser.DOM.Element{ attributes: [Statifier.Parser.DOM.Attribute.t()], children: [child()], location: Statifier.Parser.Location.t(), name: binary() }