XML.QUERY Subroutine
Parses an XML document against a query and returns the result.
Syntax
XML.QUERY(errorMsg, result, xmlDocument, xmlQuery)
Syntax Elements
errorMsg A variable in which to return an error message, should an error occur. If the subroutine completes successfully, a null string is returned.
result A variable in which to return a string containing the result of parsing the XML document against the query.
xmlDocument A string containing the XML document to be parsed.
xmlQuery A string containing the XML query to be parsed. For information about how to write an XML query, refer to Writing an XML Query.
Comments
Text lines in xmlDocument and xmlQuery can be separated by either attribute marks or new line characters (host dependent).
See Also
XML.INIT, XML.PARSE, XML.PARSE.QUERY, XML.EXTRACT.
Example
CALL XML.QUERY(EMSG, RESULT, XMLDOC, XMLQ)
Runs the XML query in the variable XMLQ against the XML document in the variable XMLDOC. On return, RESULT will contain the result, and EMSG will normally be an empty string (if an error occurred, EMSG would contain an appropriate error message).