Why it matters
XML is still everywhere on the web: sitemaps, RSS and Atom feeds, SVG, SOAP APIs and office files. A single unclosed tag breaks the whole file, and minified feeds are impossible to read.
This tool checks the XML with the browser's own parser and points to the line with the problem, formats it neatly, and runs XPath queries, which is the quickest way to pull every <loc> out of a sitemap or every title out of a feed. Namespaces work too.
How it works
- InputAn XML document, feed or sitemap
- In your browserChecked by the browser's XML parser
- OutputFormatted XML, XPath results and JSON
Where it fits in a designer's workflow
- Plan
- Design
- Build
- Test
- Launch
By the numbers
Show the numbers as a table
| Element | Count |
|---|---|
| urlset | 1 |
| url | 3 |
| loc | 4 |
| lastmod | 3 |
| priority | 3 |
| image | 1 |
How to use it
- Paste the XML.
- Fix any error at the line shown.
- Type an XPath query to pull out values.
- Copy the formatted XML, the matches or the JSON.
FAQ
Does it validate against a schema (XSD)?
No. It checks the XML is well-formed. Schema validation needs the XSD, and usually a server-side tool.
How do I query a namespaced document?
Elements in the default namespace use the d: prefix, for example //d:url/d:loc in a sitemap. Other prefixes work as declared.
Which XPath version?
XPath 1.0, which browsers support natively.
How are attributes shown in JSON?
With an @ prefix, and text content as #text when an element also has attributes or children.