Fix cXML DTD errors: xml:lang, unescaped "&" & tag order.
cXML 1.2 is validated against a strict DTD. A single raw "&" in a title ("Bolts & Nuts"), an omitted xml:lang attribute, or swapped child tags inside <ItemDetail> breaks checkout.
<!-- FAILS Ariba DTD: missing xml:lang, raw "&", wrong element order --> <ItemDetail> <Description>Bolts & Nuts M8</Description> <UnitPrice><Money currency="EUR">12.00</Money></UnitPrice> </ItemDetail>
<!-- VALID cXML 1.2 DTD: UnitPrice first, xml:lang present, "&" escaped --> <ItemDetail> <UnitPrice><Money currency="EUR">12.00</Money></UnitPrice> <Description xml:lang="en">Bolts & Nuts M8</Description> <UnitOfMeasure>BX</UnitOfMeasure> <Classification domain="UNSPSC">31161504</Classification> </ItemDetail>
Root Causes & Permanent Fix
Raw "&", "<", ">" inside product names
Always escape & → &, < → <, > → >, " → " before building cXML.
Missing xml:lang on <Description>
The cXML DTD declares xml:lang as #REQUIRED on <Description> and <ShortName>.
Wrong child order in <ItemDetail>
cXML DTD requires the exact sequence: UnitPrice → Description → UnitOfMeasure → Classification → ManufacturerPartID → ManufacturerName → LeadTime.
Frequently Asked Questions
Does cXML accept HTML tags inside <Description>?
No! Strip all HTML tags from CMS descriptions (PrestaShop/Shopify) before returning cXML — raw HTML tags break XML parsing.
Can Maillon check my XML syntax and DTD order automatically?
Yes — paste your payload into our free browser-side cXML Validator to pinpoint the exact failing line.