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.

BEFORE — Rejected by portal
<!-- 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>
AFTER — Valid cXML / OCI
<!-- VALID cXML 1.2 DTD: UnitPrice first, xml:lang present, "&amp;" escaped -->
<ItemDetail>
  <UnitPrice><Money currency="EUR">12.00</Money></UnitPrice>
  <Description xml:lang="en">Bolts &amp; Nuts M8</Description>
  <UnitOfMeasure>BX</UnitOfMeasure>
  <Classification domain="UNSPSC">31161504</Classification>
</ItemDetail>

Root Causes & Permanent Fix

Raw "&", "<", ">" inside product names

Always escape & → &amp;, < → &lt;, > → &gt;, " → &quot; 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.

See your catalogue in the SAP Ariba simulator, no sign-up.

The pre-filled demo shows a B2B catalogue, two test buyers (cXML and SAP OCI 4.0), the simulator and a purchase order as PDF and CSV.

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.