Skip to main content



XmlLookup Function

The XmlLookup function returns the value referenced by an XPath from an XML document or string.

Syntax 1

XmlLookup(xmlDocument, xpathQuery)

The XmlLookup function returns the value referenced by an XPath from an XML document or string.

Arguments

xmlDocument DataElement - An XML document.

xpathQuery String - The XPath query to be run.

Syntax 2

XmlLookup(xmlString, xpathQuery)

The XmlLookup function returns the value referenced by an XPath from an XML document or string.

Arguments

xmlString String - A string expression containing XML.

xpathQuery String - The XPath query to be run.

Syntax 3

XmlLookup(xmlDocument, xpathQuery, default)

The XmlLookup function returns the value referenced by an XPath from an XML document or string.

Arguments

xmlDocument DataElement - An XML document.

xpathQuery String - The XPath query to be run.

default Any - The default return value if no matching result.

Syntax 4

XmlLookup(xmlString, xpathQuery, default)

The XmlLookup function returns the value referenced by an XPath from an XML document or string.

Arguments

xmlString String - A string expression containing XML.

xpathQuery String - The XPath query to be run.

default Any - The default return value if no matching result.

Remarks

Example:

XmlLookup(XmlDocument1, "/Loan/LoanID", "Not Found"); // returns "Not Found"