Fix XML invalid syntax
XML must be well-formed: every opening tag must have a closing tag, attributes must be quoted, and special characters escaped.
XML parsers fail fast on the first well-formedness error. Unlike HTML, tags must be properly nested and attributes must be quoted in most cases.
Common causes
- Unclosed or crossed tags (`<a><b></a></b>`).
- Unquoted attribute values containing spaces or special characters.
- Raw `<`, `>`, or `&` in text nodes without entities.
How to fix
- Match every start tag with an end tag in LIFO order.
- Quote attribute values (`id="x"`).
- Escape characters: `<`, `>`, `&`, and quotes inside attributes as needed.
Related guides
Use our tool
Validate XMLAdvertisement