XML attributes and repeated elements
For <item id="007">Note</item>, the compact result has @id: "007" and #text: "Note". Repeated children with the same qualified name become an array. A single child stays a single value. XML values stay strings, keeping identifiers such as 007 intact rather than coercing them into numbers.
Namespace names and mixed content
Qualified names such as p:item and attributes such as xmlns:p remain in the result. Compact objects group child names, so text interleaved around elements is not a reversible representation. Ordered nodes instead record element names, attributes and a sequence of text, CDATA and child nodes. Choose that form for mixed content such as paragraphs with inline emphasis.
XML parse errors
The input must be one well-formed XML document with a root element and matching closing tags. Bare ampersands need XML escaping. The converter reports parser errors instead of returning a partial result. XML comments are retained in ordered-node mode; compact objects focus on attributes, child elements and text.
Format references
File content is read and converted in the browser. Conversion does not upload the source to a server.