In Brief

  • Each location step is made up of an axis, a node test, and zero or more predicates.

  • An axis indicates how to search for nodes. Here are the XPath 1.0 axes:

    • The child axis

    • The attribute axis

    • The ancestor axis

    • The ancestor-or-self axis

    • The descendant axis

    • The descendant-or-self axis

    • The following axis

    • The following-sibling axis

    • The namespace axis

    • The parent axis

    • The preceding axis

    • The preceding-sibling axis

    • The self axis

  • You can use these node tests in XPath 1.0:

    • The * wildcard character matches any element or attribute name .

    • A name matches a node with that name (for example, planet will match a <planet> element).

    • The comment() node test selects comment nodes.

    • The node() node test selects any type of node.

    • The processing-instruction() node test selects a processing instruction node.

    • The text() node test selects a text node.

  • Predicates are enclosed in [ and ] and may contain any valid XPath 1.0 expression.



XPath. Navigating XML with XPath 1.0 and 2.0 Kick Start
XPath Kick Start: Navigating XML with XPath 1.0 and 2.0
ISBN: 0672324113
EAN: 2147483647
Year: 2002
Pages: 131

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net