Short answer: paste the document. If it is well formed you get the indented version and a count of elements, attributes, comments and depth; if not, you get the line the parser stopped on.
Well formed is not valid
These are two different checks and only the first one is possible without a schema. Well-formed means the document follows XML's syntax rules — one root, balanced tags, quoted attributes, escaped entities. Valid means it also matches a DTD or XSD. A document can be perfectly well formed and still be rejected by the service that expects a particular shape.
Why the formatter is order-preserving
A naive formatter rebuilds the document from a map of tag → value, which loses comments, reorders attributes and turns repeated child elements into an array that may not round-trip. Here the parse keeps the node order, so <!-- note --> stays where it was and a namespace prefix like soap: is not renamed.
Sending the result somewhere else? The JSON formatter and theYAML converter do the same job for other formats.