XML.XPATH
Declaration
FUNCTION XML.XPATH(XML,XPATH,XDATA,ERR,PARAMS)
Required Includes
INCLUDE KORE-INCLUDES XML.DEFFUN
Description
Retrieve XML data using the given XPath.
OnEntry Interface
XML |
The XML document/fragment to be parsed. |
XPATH |
The XPath expression to search for in the XML document. See the Import XML XPath Expressions topic for more information. |
XDATA |
Undefined. |
ERR |
Undefined. |
PARAMS |
Undefined. |
OnExit Interface
XML |
Unchanged. |
XPATH |
Unchanged. |
XDATA |
Attribute delimited array of the data values. |
ERR |
If non-null, indicates the error number found in KT_MESSAGE. |
PARAMS |
If ERR is non-null, indicates the parameters for the error. |
If the function executed without an error, it will return a value of 0. Otherwise a value of 1 is returned. Check the ERR and PARAMS variables for details about the error.
Scope of Use
To Be defined.
Example
This example uses the XML document described in the Import XML XPath Expressions topic.
$INCLUDE KORE-INCLUDES XML.DEFFUN
*
XPATH = 'ADDRBOOK/ENTRY/EMAIL'
STATUS = XML.XPATH(XML,XPATH,XDATA,ERR,PARAMS)
IF ERR # '' THEN RETURN
When this code is run, the value of the XDATA variable will be:
name.one@some.comþname.three@some.com.