A scanner, not a pattern
Opening and closing tags, attribute quoting, entity references, CDATA, comments, processing instructions and the doctype are read in order, each by its own rule. Nothing is guessed from a regular expression.
Pikkola XML, tool No. 57
Paste a feed, a sitemap, an SVG or a pom.xml. It comes back indented, checked line by line, queried with XPath 1.0 and written as JSON. A mistake is marked at its line and column, and the document never leaves the tab.
The studio
Indent it, check it, query it, or convert it. The source stays on the left, and the result follows every keystroke.
There is no result yet. Paste something on the left, or load one of the examples.
Write an expression and press Run.
No request, no account, no storage. The Content-Security-Policy sets connect-src to none, so the page could not upload a document even if it tried.
A formatter is only as good as its reader, and a query is only as good as the tree under it. Both are the browser's own, driven by the document you paste.
Opening and closing tags, attribute quoting, entity references, CDATA, comments, processing instructions and the doctype are read in order, each by its own rule. Nothing is guessed from a regular expression.
Line and column come from the scanner position, so a tag that is never closed is marked where it opens, and a closing tag that does not match names the element that was open. Press a finding and the editor selects it.
The tree comes from the browser's XML parser and the query runs through document.evaluate. A node set, a number, a string and a boolean all come back, and a node result selects its place in the source.
Well formedness first, the rules that decide whether the document can be read at all. Every finding names a line and a column, and the line in the editor is marked when you press it.
It checks the syntax and the namespaces, not a schema. A clean result means the document is well formed XML, not that it matches an XSD or that a service will accept it.
No. There is no endpoint to send it to. The scanner, the writer and the converter are JavaScript files on this domain, the XPath query runs inside the page, and the Content-Security-Policy sets connect-src to none. Load the page once and it keeps working with the network off.
Two of them. A hand written scanner reads the document and marks the line and column, because the browser's parser only hands back a message. The tree used for formatting, XPath and JSON comes from the browser's own XML parser. Both are well formedness checkers: neither knows your schema.
Whitespace between elements, and nothing else. A text node keeps every character it had, mixed content is left exactly as written, and CDATA, comments, processing instructions and the doctype are carried through. Minify removes the whitespace between elements only.
An attribute becomes a key that starts with @, so id="3" is "@id": "3". Text becomes the value of an element when nothing else sits beside it, and goes under #text when attributes or child elements do. Repeated siblings become an array. Comments are left out and counted.
A sitemap declares its default namespace, and XPath 1.0 has no default namespace, so //loc does not match it. Write //*[local-name()='loc'], or declare a prefix and query with it. The page knows every prefix the document declares, so a query that uses one of them works as written.
No. It reads the document as XML: the syntax, the quoting and the namespaces. Whether the elements are the ones your XSD, your RSS reader or your Maven build expects is a different question, and a different tool.