Skip to content

compactXML

compactXML(xml, options?, indent?) → string · XML

Compact an XML string by removing unnecessary whitespace between elements.

  • xml (required): XML string to compact

  • options (optional): formatting options

  • indent (optional): indentation level

utlx
// See Chapter 22 for XML processing.
{
  minified: compactXML(renderXml($input))
}

Released under AGPL-3.0.