![]() ![]() In addition, XPath allows extension functions through the use of namespaces. XPath supports a set of built-in functions such as substring(), round(), and not(). For example, /PO/PONO identifies the second purchase-order number element under the PO root element. For example, /PO/SHIPADDR selects the shipping address element of all purchase orders whose purchase-order number is 20 and whose purchase-order name is PO_2.īrackets are also used to denote an index into a list. XPath supports a rich list of binary operators such as OR, AND, and NOT. For example, /PO/*/STREET matches any street element that is a grandchild of the PO element. Used as a wildcard to match any child node. ![]() For example, PurchaseOrder//ShippingInstructions matches any ShippingInstructions element under the PurchaseOrder element. Used to identify all descendants of the current node. ![]() For example, /PurchaseOrder/Reference identifies the purchase-order name element Reference, a child of the root element. For example, /PO refers to the child of the root node whose name is PO.Īlso used as a path separator to identify the children node of any given node. Table 4-1 Common XPath Constructs XPath Constructĭenotes the root of the tree in an XPath expression. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |