Attestwire › Rule reference › ATW-TEXT-NOT-XML
ATW-TEXT-NOT-XML Text must contain only characters an XML document can carry
noun · Attestwire · fatal · BT-22
For a sample invoice, the library reports: note contains U+0000, which an XML document cannot carry. The generators remove them, and nothing is left: the field would be written empty.
- Business term
BT-22- Severity
fatal
The fix
Remove control characters and unpaired surrogates from the text before building the invoice. They usually come from a copy-paste or a broken encoding upstream.
What the library returns
The full error returned by @attestwire/en16931. It includes the rule ID,
affected field and suggested correction. Developers can use this object in their application:
{
"rule": "ATW-TEXT-NOT-XML",
"field": "BT-22",
"severity": "fatal",
"message": "note contains U+0000, which an XML document cannot carry. The generators remove them, and nothing is left: the field would be written empty.",
"fix": "Remove control characters and unpaired surrogates from the text before building the invoice. They usually come from a copy-paste or a broken encoding upstream.",
"docsUrl": "https://github.com/attestwire/en16931#not-implemented-yet"
}