Friday, November 6, 2026 · Asia/KarachiFree tools · No signup · Runs in your browser

XML Parser

The XML parser lists the path of each start tag. A note that contains a to element prints note and then note/to. Text inside the tags is not a path. A mismatched closer is an error that names both tags.

New

This is not a schema. The validator page says well-formed or not. This page says where each element sat, and it still refuses a file it cannot walk.

How to use

  1. Paste XML that opens and closes in order.
  2. Press Parse. Each numbered line is a path.
  3. Reset restores the note sample.

Formula / how it works

Paths. The walker keeps a stack. A start tag is appended and the path is printed. A closer must match the top of the stack. A self-closing tag is printed and not left on the stack. The sample has two paths: note, and note/to. Ada is text and does not appear. A single self-closing a element is one path, a. Forty paths is the printed cap. The count is how many were listed. A file that ends while a tag is open throws and names that tag. A closer for the wrong name throws and names both.

Validator versus parser. The XML validator returns a status. This page returns the list. Both refuse a broken stack. Neither applies a schema. Attributes are not printed. Namespaces are part of the tag name as written. If you need the text of an element, read the source. The path list will not quote it.

A note containing a to element lists note and then note/to. The path is start tags only. The text Ada is not a path. A mismatched closer throws and names both tags. A self-closing tag appears in the path and does not stay on the stack. This is a list, not a schema. The validator page answers well-formed or not. This page answers where each element sat, and it still errors if the file is not well-formed enough to walk. Forty paths is the cap on the printed list so a huge file does not flood the page. The count says how many were listed.

note and note/to are the sample paths. a alone is the self-closing check. Ada never appears, and that absence is the lesson: text is not structure. If you need Ada, read the source. If you need to know that to sits inside note, read the path. A file that throws is not given a partial list in the result. The error is the result. Fix the closer and parse again. Forty paths is enough to see the shape of a small document and small enough to read. A larger file should be cut down to the element you care about before you paste it. Attributes stay in the source and out of the list, so two tags with the same name and different attributes look the same on this page.

The note sample has two paths and the self-closing sample has one. Ada is absent in both. That absence is worth pointing at when you teach the page. A path is a stack of start tags. Text is not on the stack. If a file throws, read the two names in the error and fix the closer before you look for a path. A partial walk is not offered. Forty lines is the most you will see, so cut a large document down to the element you are asking about. Attributes remain in the source box, which is still editable.

Worked examples

A note and a child

Inputs: XML: <note><to>Ada</to></note>

Leave the box as <note><to>Ada</to></note> and press Parse. The second path is note/to.

Result: Paths: 2 1. note 2. note/to Paths list each start tag. This is not a schema check.

One self-closing tag

Inputs: XML: <a/>

Replace the box with <a/> and press Parse. The only path is a.

Result: Paths: 1 1. a Paths list each start tag. This is not a schema check.

Use cases

  • Seeing the nesting of a small file.
  • Checking a self-closing tag appears once.
  • Finding a mismatched closer by the error text.
  • A list rather than a yes-or-no status.

Tips & limitations

  • Text inside tags is not listed.
  • Forty paths is the printed cap.
  • This is not a schema.
  • A broken stack is an error, not a partial list you should trust.

FAQ

Why is Ada missing?

Ada is text. The list is start-tag paths only.

What is note/to?

The to element opened while note was still open. The slash joins the stack.

Does a self-closing tag stay open?

No. It is listed and does not wait for a closer.

How is this different from the validator?

The validator returns a status. This page returns the paths, and both reject a broken stack.

Are attributes shown?

No. Only tag names and their nesting.

Is the XML uploaded?

No. The walk runs in the browser.

Runs entirely in your browser; nothing is uploaded. Check the output before you rely on it in production code, data or security decisions.