Inspect how an XML document is organised
When an XML file is difficult to read as a wall of tags, the useful question is often not “what is XML?” but “which element contains this value, and how is it connected to the rest of the document?” Load your XML above to build a browsable document tree and inspect the hierarchy without manually counting opening and closing tags.
When a DOM view is useful
- Find a value inside nested data: expand the parent elements and follow the path to the element or text you need.
- Understand a feed or export: inspect repeated elements, attributes, and parent-child relationships before converting the file to another format.
- Check an unexpected document: see where a value sits in the hierarchy and compare it with the structure you expected.
- Learn how the browser reads XML: view the document as nodes rather than only as raw markup.
How to inspect your XML
- Select an XML file or load the sample document.
- Review the raw markup and correct malformed XML if the parser reports an error.
- Build the DOM tree, then expand the relevant branches to locate elements, text, and attributes.
- Use the displayed structure to identify the path to a value or to understand how repeated records are nested.
What the tree can—and cannot—tell you
The Document Object Model (DOM) represents a parsed document as connected nodes. Elements can contain child elements, text nodes, and attributes. A tree view makes those relationships easier to follow, but it does not automatically explain what a field means to the application that created the file.
A DOM tree is also not the same as a visual web page. It shows the structure of the XML document, not how a browser would style HTML or how a particular application interprets business rules. If your goal is to create a spreadsheet, use an XML-to-CSV workflow; if you need JSON output, use an XML-to-JSON converter. Use this page when your immediate goal is to inspect structure.
Common issues to check
- Malformed markup: missing closing tags, incorrect nesting, and unescaped ampersands can prevent parsing.
- Namespaces: XML names may include namespace prefixes. Read the actual names shown in the tree when locating elements.
- Large documents: expand only the branches you need; very large files may take longer to parse and explore.
- Repeated records: similar-looking nodes may represent separate items. Check their parent and sibling relationships before drawing conclusions.
Frequently asked questions
Is a DOM tree the same as converting XML to JSON?
No. A DOM tree helps you inspect the parsed document structure. JSON conversion produces a separate data representation for copying, downloading, or using in another workflow.
Why does the tree fail to appear?
Check the parser message and correct malformed XML first. If the file is very large, try a smaller sample to determine whether size is affecting processing.
Does the file leave my computer?
The page parses the selected XML in your browser rather than uploading it to a conversion server.