XPath - Input Data for Examples

admin's picture
<?xml version="1.0" encoding="UTF-8"?>
<Data>
         <PrimaryDocument SCIObjectID="serverName:6546ef:f8ca28794b:-3ae6"/>
         <username>Joe</username>
         <instanceData>
                   <user_info>
                            <username>Joe</username>
                            <UserService>
                                      <getUserToken>
                                               <usertoken>
                                                        <username>admin</username>
                                                        <firstname>Joe</firstname>
                                                        <lastname>User</lastname>
                                                        <fullname>Joe User</fullname>
                                                        <email>[email protected]</email>
                                                        <parentid>John</parentid>
                                                        <groups attName="test_value">groups_content
                                                                  <group>tpadmin</group>
                                                                  <group>operator</group>
                                                        </groups>
                                                        <permissions>
                                                                  <perm type="admin" id="1">POReqSend</perm>
                                                                  <perm type="cert" id="cert_1">CA_CERTS</perm>
                                                                  <perm type="cert" id="cert_2">SYSTEM_CERTS</perm>
                                                                  <perm type="template">POConfirmSend.xfm</perm>
                                                                  <perm type="admin" id="2">POQueryApprover</perm>
                                                                  <perm type="businessprocess">PO.bp</perm>
                                                                  <perm>permission_1</perm>
                                                                  <perm>permission_2</perm>
                                                        </permissions>
                                               </usertoken>
                                      </getUserToken>
                            </UserService>
                   </user_info>
                   <POdocument>
                            <info>
                                      <POnum>RET8999</POnum>
                                      <POdate>2003:11:12</POdate>
                            </info>
                            <shipTo>
                                      <name>Internet Retailer Inc.</name>
                                      <street>123 Via Way</street>
                                      <city>Milwaukee</city>
                                      <state>WI</state>
                                      <zip>53202</zip>
                            </shipTo>
                            <billTo>
                                      <name>Company name</name>
                                      <street>47 Eden Street</street>
                                      <city>Denver</city>
                                      <state>CO</state>
                                      <zip>80219</zip>
                            </billTo>
                            <items>
                                      <item>
                                               <productID description="Product_1">CO11</productID>
                                               <quantity>5</quantity>
                                               <price>1.23</price>
                                               <currency>USD</currency>
                                      </item>
                                      <item>
                                               <productID description="Product_2">CO12</productID>
                                               <quantity>7</quantity>
                                               <price>2.34</price>
                                               <currency>USD</currency>
                                      </item>
                                      <item>
                                               <productID description="Product_3">CO13</productID>
                                               <quantity>9</quantity>
                                               <price>3.45</price>
                                               <currency>USD</currency>
                                      </item>
                            </items>
                            <total>53.58</total>
                   </POdocument>
         </instanceData>
</Data>
An XPath expression returns either a node-set, a string, a Boolean, or a number.
The result of the Xpath is shown in a part of XML bolded.