Veebiteenused (kordamisküsimused ja vastused kontrolltööks)
– /CATALOG/CD/TITLE
– //TITLE
Pärime välja kõik cd’d, mille hind on suurem kui 10
– /CATALOG/CD[PRICE>10]
XPath is used to navigate through elements and attributes in an XML document.j
o Süntaks
XPath uses path expressions to select nodes in an XML document. The node is selected
by following a path or steps. The most useful path expressions are listed below:
Expression Description
nodename Selects all nodes with the name "nodename"
/ Selects from the root node
// Selects nodes in the document from the current node that match the selection no matter
where they are
. Selects the current node
.. Selects the parent of the current node
@ Selects attributes
RELATIVE VS. ABSOLUTE PATHS
In HTML, you can specify an Absolute Path for the , describing where another page is