By YiyaoPublished
Check the structure before the next step
Paste an XML document to check whether its tags, attributes and nesting form a readable XML structure. Start with a small, redacted sample when investigating an import failure. The result helps you decide whether to fix the document or move on to field mapping.
Choose Validate XML to check the current input. A successful result means the document is well-formed XML. It does not establish that an order is complete, a product price is correct, or the receiving application accepts the file.
Read the result in context
| Result | Meaning | Next action |
|---|---|---|
| Well-formed XML | The parser can read the document structure | Check required fields and the destination's data rules |
| Syntax error | A tag, attribute or other syntax rule prevents parsing | Review the reported location and the preceding opening tag |
| Unsupported document type declaration | The input contains a DTD | Use an approved DTD-free sample or your controlled local validation environment |
| No input | There is nothing to validate | Paste XML or load the example |
Line and column information helps locate an error; the root cause can appear earlier. For example, an unclosed opening tag may only be detected when the parser reaches a different closing tag.
Work through a small example
The input <items><item id="A1"><name>Lamp</name></item></items> has one root element, matching tags and a quoted attribute. It should pass the structure check.
Change </name> to </Name> and run the check again. XML names are case-sensitive, so the opening and closing names no longer match. Restore the original closing tag before converting the document.
A bare ampersand in Home & Office also needs attention. In XML text, write Home & Office to represent the ampersand. Escape the character once at the XML layer; repeatedly escaping an already encoded value can change the intended text.
Choose validation or conversion
Use this page when the first question is whether the XML can be parsed. Use XML to CSV when the document already parses and you need repeated records as table rows. Use XML to JSON when the next application expects a JSON representation.
Keep a sample of the source and compare the same records after conversion. Successful parsing is the beginning of that check, not a replacement for it. Missing identifiers, repeated fields and changed numeric types require separate review.
Keep the diagnostic sample useful
Remove credentials, personal information and private endpoints before sharing an example with a colleague. Preserve the structure that triggers the failure: removing every attribute or nested element may remove the actual problem.
For a large export, reduce it to the smallest complete document that still fails. Keep the root and any relevant namespace declarations. After fixing the example, rerun the complete file in its intended processing environment.
FAQ and next step
Does a pass mean the document matches an XSD? No. This tool checks well-formedness. Validate against the receiving system's schema in a schema-aware environment when that is required.
Can I paste HTML? HTML and XML have different parsing rules. A browser displaying a page successfully does not mean its source is valid XML.
Where should I go after a pass? Check the receiving format. Choose the XML-to-CSV tool for a table, or the XML-to-JSON tool for structured application data. If you first need to collect public web content, explore Crawler Console and check which output format the crawl supports.
