XML-002:Malformed XML structure
Fix: Fix XML syntax errors.
XML document is not well-formed.
Engine Classification
Financial or legal field · Modification blocked by policy
Reason: The XML document has structural errors (unclosed tags, invalid nesting, etc.) that make it unparseable. Your invoicing software must generate well-formed XML. Contact your software vendor to fix the XML generation.
What is XML-002?
XML-002 is a fatal validation rule defined in the ubl-2.1 specification. It validates the XML parsing error element in the UBL invoice XML.
When this rule fires, the invoice is rejected by Peppol access points and never reaches the buyer.
Target path: XML parsing error
Why This Error Matters
Malformed XML cannot be processed.
XML-002 is a hard failure — the invoice must be corrected and re-sent before it can reach the recipient.
Validator Behavior
- ·Causes invoice rejection
- ·Fails UBL schema validation
- ·Error returned: XML-002
- ·Specification: ubl-2.1
How to Fix It
Check brackets
All tags must close properly
Check quotes
Attributes must use quotes
Validate
Use XML validator
XML Example
Generic example based on the rule's target XPath. Your actual XML structure may differ.
<!-- Triggers validation error --> <XML parsing error></XML parsing error>
<!-- Corrected --> <XML parsing error>VALID_VALUE</XML parsing error>
Technical Reference
XML parsing errorCommon Causes
- ·Unclosed tags
- ·Missing quotes
- ·Invalid characters
Seeing this in production? The API handles XML-002 automatically. See the fix response →
Frequently Asked Questions
XML document is not well-formed.
Fix XML syntax errors. This error involves a protected field — Invoice Navigator flags it in your pipeline so your team can correct it at the source.
Yes, XML-002 is a critical error that must be fixed.
Related Errors
Related Content
Last updated: 3 March 2026
Validate your invoice
Drop your XML here to check for XML-002
Detect XML-002 before submission
This error involves a financial field that can't be auto-modified. We'll flag it with a clear diagnosis so you can fix it at the source.