- Root element
- The single top-level element that wraps all other elements in a valid XML document. XML requires exactly one root element, so JSON arrays must be wrapped in a named root when converting to XML.
- Attribute prefix
- A character prepended to JSON keys to indicate that the corresponding value should become an XML attribute rather than a child element. The @ character is the convention used by xml-js; $ is used by xml2js.
- XML prolog
- The optional declaration at the start of an XML document: <?xml version="1.0" encoding="UTF-8"?>. Many XML parsers, SOAP clients, and validators expect or require this declaration to appear before any elements.
- Self-closing tag
- An XML element written as <tagName/> rather than <tagName></tagName>, used for elements with no text content or child elements. Self-closing tags are produced for JSON null values and empty objects.
- Entity escaping
- The process of replacing special XML characters in text content and attribute values with their named entity references: & → &, < → <, > → >, " → ". Required for valid XML 1.0 output.
- Element repetition
- The XML pattern where multiple sibling elements share the same tag name to represent an array. A JSON array [{"item": 1}, {"item": 2}] produces two repeated <item> elements as siblings under a parent element.