About the XML Parser
When XML behaves unexpectedly, the useful question is what the parser actually saw, not what the file looks like. This page runs your document through the browser DOM parser and prints the resulting node tree with each node labelled by kind: element, text, cdata, comment or pi. Indentation follows nesting depth, and attributes are listed beside the element that owns them.
A short header first reports the root element name, the number of elements, attributes and text nodes, how many comments and CDATA sections survived, and the deepest nesting level. Those counts answer questions such as whether an export really contains the 400 records it should, or whether whitespace between tags is being turned into text nodes that your own code then has to skip.
The three checkboxes control noise. Turn text nodes off to see structure alone, turn comments on when you are checking a hand-maintained file, and turn attributes off when a document carries dozens of namespace declarations. Whitespace-only text is never listed, matching how most parsers are configured. Long text values are truncated to keep the readout scannable; for the full values use XML to Text, and for a clickable tree use the XML Viewer.
How to use
- Paste the XML you want to inspect, or upload the file.
- Read the header line for element, attribute and depth counts.
- Use the checkboxes to hide text nodes or reveal comments.
- Copy or download the readout to attach to a bug report.
Common questions
- What is a text node?
- Any run of character data between tags. Whitespace-only runs exist in the DOM too, but this readout hides them because they are almost never meaningful.
- Why do CDATA sections show as their own node type?
- A parser keeps CDATA as a separate node kind even though its content behaves like text. Seeing them listed explains why a naive text extractor might miss that content.
- Does it validate against a schema?
- No. It checks well-formedness only. A document with an unknown element parses fine here even if a schema would reject it.
- Are namespace prefixes preserved?
- Yes. Element and attribute names are shown exactly as written, including any prefix such as
dc:lang.