Skip to content

normalizeXMLEncoding

normalizeXMLEncoding(xml, targetEncoding) → string · XML

Auto-detect the encoding of an XML string and convert it to a target encoding. Also updates the XML declaration. See Chapter 22.

  • xml (required): XML string to re-encode

  • targetEncoding (required): target encoding (e.g., "UTF-8")

utlx
{
  normalized: normalizeXMLEncoding($input.xmlPayload, "UTF-8")
}

Released under AGPL-3.0.