Syntax
XMLSelectText <xpath> <xml> <nslist>Description
Return the text value of XML nodes selected by an XPath expression.Parameters
<xpath>
- The XPath expression that will be used to select the nodes returned
<xml>
- The XML document to which the XPath expression will be applied.
<nslist>
- A list of name=value pairs in which the name is the name used for the namespace in the XPath expression (i.e. the namespace identifier) and the value is the actual namespace. (Example below.)
Remarks
The most common reason why XPath queries don't return expected results is not using namespace identifiers where required.If the full XML representation of the selected node is needed, use XMLSelect.
This statement is most useful when a single node is selected by the XPath expression. If multiple nodes must be processed, combine use of this statement with the XMLMatch statement as is shown in the extensive example on the XMLMatch reference page. The PhantomScript XML-handling statements are XMLMatch, XMLSelect, XMLSelectText, and XMLTransform.
Example
See the example for XMLMatch for an example of the use of this statement as well.