20 chars · 1 line
Waiting for input
20 chars · 1 line
Waiting for input
XML name syntax
The sample starts the element name with the digit 1. XML names have stricter lexical rules than arbitrary object keys or database column names, so data mapped into element names may need a deliberate naming scheme. This tool is free to use. No account or payment is required.
Last updated
A key such as 1root is legal in JSON when quoted, but cannot be copied directly into an XML element name. Converters need an explicit mapping instead of assuming every source key is a valid XML name.
After changing an element name, make the same change to its closing tag. Otherwise the original name error may be replaced by a mismatched-tag error.
Move the numeric suffix away from the first character of the element name.
<1root>value</1root><root1>value</root1>Common questions
No. Ordinary XML names cannot start with a digit.
Yes. The same case must also be used by the corresponding closing tag.
JSON object keys are strings, while XML element names follow XML-specific lexical rules.
Debugging a specific XML issue? Browse XML troubleshooting.