XML
Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.
XML Document Preview.
At a glance
| Original creator | World Wide Web Consortium (W3C) |
| First published | 1998 |
| Purpose | A general text format for structured data, derived from SGML, on which many document and data formats are built. |
| Extensions | .xml |
| Poka parser | poka-xml |
| Viewer | poka-tree-viewer |
| Depth tier | Parser with a shared viewer (see Depth tiers) |
| Breadth tier | B2 Broad (see Breadth tiers) |
How much Poka reads
B2 Broad. The common content of the current and the common older versions is decoded. Some named features or versions are not, and are listed.
Confidence: high (the reviewer read the code and a test that proves the claim). Basis: Reviewed 2026-10-16: parsers/poka-xml/src/lib.rs (BOM and UTF-16 decoding, DOCTYPE stripping, bounded element tree with attributes and text, root-element dispatch to 9 dialects: XSD, XSLT, MSBuild, .NET config, resx, SMIL/WPL, XDR, XML-DSig/XAdES, buildingSMART IDS), src/tests.rs (about 30 tests) and tests/samples.rs over 68 corpus .xml files. Covers generic well-formed XML 1.0 and 1.1 documents; other XML dialects with their own crates (DesignBuilder, IFC XML, LandXML, BPMN, DMN, KML) are routed elsewhere by content sniffing and are not covered here.
What Poka does not read
- Declared non-Unicode encodings (ISO-8859-x, Windows-1252) are only echoed, not applied, so non-ASCII text is garbled
- Comments and processing instructions are dropped
- The DOCTYPE, DTD declarations and custom entities are removed, so custom entities show as written
- Namespace declarations are shown on the root only, and namespaces are resolved only for the root element
- At most 12 attributes per element are kept, each value cut at 120 characters
- Element text is cut at 160 characters and mixed content is joined without position
- Capped at 4 MB, 10000 elements and 64 levels deep; beyond that the tree is truncated
- No schema validation, XInclude or xml:space handling
Background
XML 1.0 became a W3C Recommendation in February 1998; later editions (2000, 2004, 2006 and 2008) folded in errata without changing the language. XML 1.1, from February 2004, removed the dependence on one Unicode version (Library of Congress). Poka builds a bounded element tree and, keyed on the root element, adds a summary for dialects it recognises: XML Schema, XSLT, MSBuild projects, .NET configuration and resource files, SMIL playlists, XML-Data Reduced, XML signatures and buildingSMART IDS. The DOCTYPE is removed before parsing and nothing outside the file is fetched, which closes the external-entity and entity-expansion attacks.
Versions
| Version | Identifier | Poka | Note |
|---|---|---|---|
| XML 1.0 and 1.1 | Partly read | Read by the non-validating quick-xml parser; DTDs are not processed. The declared encoding is only echoed and the text is decoded as UTF-8 with replacement, so ISO-8859 and Windows-125x files are decoded wrongly. |
Libraries
Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.
- quick-xml (used; MIT; Rust)
- xgbxml (candidate; MIT; Python; https://github.com/stevenkfirth/xgbxml) — lxml extension for reading and editing gbXML; PyPI 0.0.10, last release October 2023
- SAM_gbXML (candidate; LGPL-3.0; C#; https://github.com/HoareLea/SAM_gbXML) — gbXML import/export and validation within the SAM toolkit; tied to SAM's geometry model; actively pushed in October 2026
Software that uses it
- gbXML (Green Building XML)
- Profil Koordynator
- LandXML
- COBie
Sources
- https://www.loc.gov/preservation/digital/formats/fdd/fdd000263.shtml
- parsers/poka-xml/src/lib.rs