DriveWorks Pro 15: XPathXMLGet [send feedback...]

XPathXMLGet

Finds the value at a given path in an XML string.

Syntax

XPathXMLGet([Input Data],[Path])

Where:

Input Data is the input data on which to search.

Path is the path to find in the given data object.

Examples

Example XML Data being returned to the constant DWConstantXML

            <?xml version="1.0" encoding="UTF-8"?>
            <bookstore>
                 <book>
                    <title lang="en">Harry Potter</title>
                   <price>29.99</price>
                </book>
                <book>
                    <title lang="xml">Learning XML</title>
                    <price>39.95</price>
                    <difficulty>Easy</difficulty>
                   <category>Programming</category>
                </book>
            </bookstore>
RuleMeaning
XPathXMLGet(DWConstantXML,"/bookstore/book")Will return...
<book>
    <title lang="en">Harry Potter</title>
    <price>29.99</price>
</book>
<book>
    <title lang="xml">Learning XML</title>
    <price>39.95</price>
    <difficulty>Easy</difficulty>
    <category>Programming</category>
</book>
                    
XPathXMLGet(DWConstantXML,"/bookstore/book[1]")Will return...
<book>
    <title lang="en">Harry Potter</title>
    <price>29.99</price>
</book>
                    

This function relates to the Send HTTP Request task.

Table of Contents