XML Stats
How big and how deep is this document, and what is actually in it? This counts elements and attributes, ranks them by frequency, measures nesting depth and reports the deepest path, and lists every namespace in play.
XML Stats
A single walk of the parsed document produces two things: totals (elements, attributes, text nodes and characters, CDATA sections, comments, empty elements, maximum depth) and frequency tables ranking element and attribute names by how often they appear. The JSON format carries the same figures for scripting.
How to use it
- Paste the document, or drop a file on the left pane.
- Leave the format on text report for something readable, or switch to JSON to assert on a number elsewhere.
- Raise Show top if the frequency tables are cut off before the names you care about.
- Copy the report, or download it for a ticket.
What the frequency tables tell you
The element table is the fastest way to understand an unfamiliar document: the name at the top is almost always the record element, and its count is the number of records. A long tail of names appearing once or twice usually means optional fields — worth knowing before you write an XPath that assumes they exist.
The attribute table answers the other structural question: is this document attribute-heavy or element-heavy? That decides how you write your extraction code, and whether XML to CSV needs attributes turned on.
Depth and the deepest path
Maximum depth counts the root as level 1. The deepest path is reported as a slash-separated element chain, which is the quickest way to find the part of the document that will be awkward to query — and, in a hand-written file, often the part that has drifted from the intended structure.
Namespaces
Every namespace URI encountered — on elements and in xmlns declarations — is listed. A document with several namespaces is one where plain XPath will disappoint you; the namespace remover exists for exactly that moment.
FAQ
How is depth counted?
The root element is depth 1, its children depth 2, and so on. Text nodes are not counted as a level.
What counts as an empty element?
An element with no child elements and no non-whitespace text — <br/> or <note></note>. A high count often means optional fields are being emitted as empty rather than omitted.
Why does the byte count differ from my file size?
Bytes are counted as UTF-8 from the text in the pane. A file saved as UTF-16, or with CRLF line endings, has a different on-disk size.
Can I use the JSON output in CI?
The numbers are the same, so it is a good way to decide what to assert on — but run the actual check with an XML library in your CI language rather than a browser tool.
Is the document uploaded?
No. Parsing and counting both happen in your browser.
Related tools
- XML Tree Viewer — browse the structure the numbers describe
- XML Validator — check the document parses first
- XML to CSV — once you know the record element
- XPath Tester — query the paths the report reveals
- Namespace Remover — if the report lists namespaces
Privacy
100% client-side. Counting happens entirely in the page. See the privacy policy.