An XML formatter can add indentation and line breaks so nested elements are easier to inspect. Work on a copy and compare the parsed content before and after formatting if whitespace inside text nodes matters.
Formatting does not repair missing closing tags, invalid entities, or a wrong schema. Use an XML parser to check well-formedness, then validate against the consuming application's rules. Inspect namespaces, attributes, and mixed content; pretty-printing can change meaningful whitespace in some documents.
Readable XML is not automatically correct XML.