SLR TECH / XML

Make sense of your XML.

Format nested markup, check well-formedness, and inspect changes between two documents.

XML tools

3

Begin with the complete document

A fragment copied from the middle of an XML file may be missing its enclosing element or namespace declarations. Start with a small complete document so that a syntax error reflects the source rather than the way it was copied.

The formatter helps expose nesting in element-only structures. The validator checks whether the browser can parse the XML. The comparison tool highlights line-level changes and supports reviewing two versions side by side. Its options affect the comparison, so check them before interpreting the result.

Syntax and schema answer different questions

A well-formed document can still omit a required field or use a word where your application expects a number. Those are schema or application-level concerns. The basic browser validator does not perform XSD validation.

  1. Check matching opening and closing tags and quoted attribute values.
  2. Keep namespace declarations with the elements that use them.
  3. Preserve meaningful whitespace and mixed text content.
  4. Validate against the receiving system’s schema separately where required.

Keep an untouched original

Formatting is not XML canonicalization or signature verification. Use the signing system’s approved tools for signed XML. For support, share only a minimal fictional example, not an entire private export.

Read the SLR CORE guide to XML validation for examples of well-formedness, escaping, and schemas. For ordinary prose rather than structured markup, Text Compare may be the simpler choice.