Previous Topic: applyXPathNext Topic: checkCalendarDate


applyXPathToUrl

The applyXPathToUrl function uses an XPath query to extract XML data from a specified URL. The function returns an XML fragment that lists the nodes that result from the query.

Syntax

sXML = applyXPathToUrl(url, xpathQuery, namespaceAware, returnArray)

Arguments

url (String)

Defines the URL of the XML document on which to run the XPath.

xpathQuery (String)

Defines the XPath query to run.

namespaceAware (Boolean)

(Optional) Specifies whether to strip name spaces before applying the XPath query.

Values:

True: CA Process Automation does not strip name spaces before applying the XPath query.

False: CA Process Automation strips name spaces before applying the XPath query, making the query simple.

Default: True

returnArray (Boolean)

(Optional) Specifies whether to return an array of results or a single string.

Values:

True: The function returns an array of results.

False: The function returns a single string with multiple results concatenated in the string.

Default: False

Note: If the XPath query does not find a match, it returns a blank array.

Return Values and Examples

One of the following return values, based on the value of the returnArray argument.