What Is a Location Path?

   



XPath Axes

You can think of XPath as a mechanism by which you can specify a node or a set of nodes ('node set') of an XML document that need to be processed in some fashion. Since an XML document consists of hierarchically related data, it makes sense that you need the ability to select the descendants, ancestors, and siblings of a given node (called the 'context node'). XPath gives you this ability partly by providing thirteen 'axes,' each of which generates a (possibly empty) set of nodes relative to the context node. You've already seen the 'ancestor' axis and the 'descendant' axis in the previous section. In case you're interested, the complete list of axes is given below:

  • ancestor

  • ancestor-or-self

  • attribute

  • child

  • descendant

  • descendant-or-self

  • following

  • following-sibling

  • namespace

  • parent

  • preceding

  • preceding-sibling

  • self

This appendix contains examples that will illustrate the use of some of these axes.



   



Fundamentals of SVG Programming. Concepts to Source Code
Fundamentals of SVG Programming: Concepts to Source Code (Graphics Series)
ISBN: 1584502983
EAN: 2147483647
Year: 2003
Pages: 362

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