The buyer reports an invalid character in your cXML
A parse error naming a character or a byte position, often on only some products — typically the ones with accented characters or data imported from an older system.
Two distinct faults produce this error and the fixes are different. Either the bytes do not match the encoding you declared, or the document contains control characters that XML forbids outright. The second is the one that wastes time, because no encoding declaration makes a control character legal and it cannot be escaped either — the numeric reference for it is invalid too.
Causes, most likely first
Ordered by how often each one turns out to be the culprit, not by how interesting it is. Work down the list.
-
The declared encoding does not match the actual bytes
How to confirm: Failures cluster on products with accented characters, umlauts or anything outside ASCII. You declare UTF-8 and emit Latin-1, or the reverse, and everything else in the catalogue passes.
Fix: Emit UTF-8 and declare UTF-8. Set the encoding at the serialiser and on the Content-Type header, so the two cannot drift apart.
-
Control characters in the product data
How to confirm: The error names a low byte value such as 0x00, 0x0B or 0x1A. XML 1.0 permits only tab, line feed and carriage return from that range, and legacy ERP exports carry the others routinely.
Fix: Strip them where the data enters your system, not where the document leaves it. Escaping is not available here —  is just as invalid as the raw byte.
-
A byte order mark before the XML declaration
How to confirm: The parser reports content before the prolog, or an unexpected character at position zero, and the document looks perfect in every editor you open it in.
Fix: Write the document without a BOM. Several Windows and .NET defaults add one unless told otherwise.
-
Double encoding
How to confirm: You see é where é belongs, or ’ where an apostrophe belongs. The document is well-formed and the text is wrong, so it may be accepted and complained about later rather than rejected.
Fix: Find the place where an already-decoded string is encoded a second time. This is nearly always one conversion too many in a pipeline, not a missing one.
-
Typographic characters through a Latin-1 pipeline
How to confirm: Smart quotes, em dashes and ellipses pasted into product descriptions from a word processor. They survive your database and fail at the document boundary.
Fix: Normalise on input. UTF-8 throughout removes the class of problem entirely.
If it is not on your side
Ask the buyer for the byte offset in the error and the bytes immediately around it. That turns an argument about encoding into a single identifiable character, and usually a single identifiable product.
Check the document itself
Before chasing “The buyer reports an invalid character in your cXML” further, paste the cXML or OCI payload into our free tester. It runs in your browser and reports the structural problems buyers reject on. The interactive demo plays the whole round trip from the buyer's seat.
Open the tester Play the demoRelated questions
Can we just escape the offending character?
For ordinary text, yes — escape the five XML entities and be done. For control characters, no: XML 1.0 excludes them from the document entirely, and a numeric character reference pointing at one is equally invalid. They have to be removed.
Should we declare UTF-8 or ISO-8859-1?
UTF-8, unless a buyer has specifically pinned something else. A handful still do, and that is worth asking during setup rather than discovering through a rejection.
Rather not be the one debugging this?
A free PunchOut shop runs the PunchOut round trip for you: upload from Excel, test it, invite your buyer.
Start free Send us the error