You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

xml()

Usage

xml(string)

Description
Tries to parse the contents of the given string into an XML document, returning the document on success. This method can be used in conjunction with read() and xpath() to read data from an XML file on disk.

Example

${xml(read('test.xml'))}

results in

[#document: null]

Search results for "xml()"

xml()

Tries to parse the contents of the given string into an XML document, returning the document on success. This method can be used in conjunction with read() and xpath() to read data from an XML file on disk.

xml(string)

from_xml()

Parses the given XML and returns a JSON representation of the XML which can be further processed using from_json() or JSON.parse().

from_xml(source)

escape_xml()

Escapes the characters in a String using XML entities.

escape_xml(string)