xpath()
Usage
xpath(xmlDocument, xpathExpression)
Description
Evaluates the given xpath expression on the given XML document, returning the evaluation result. This method can be used in conjunction with xml()
and read()
to read an XML file from the Structr exchange/
directory. Alternatively a file from the virtual filesystem can be read using the get_content()
function.
See Anatomy of a Structr application for more information.
Example
${xpath(xml(read('test.xml')), '//value')}
results in
Test