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

Graph-Browser

Related Articles
About this article
Last change 2017-12-06
Topics FrontendFunctionsServerStructr 2.0