Home arrow XML arrow Page 3 - XPath Basics

First Steps - XML

One of the fundamental constructs for XSL transformations and XML links, XPath is nonetheless one of the lesser lights of the XML universe. However, if you're serious about developing your XML skills, you need to know it inside out - and this tutorial has all you need to get started.

  1. XPath Basics
  2. Dog Days
  3. First Steps
  4. Revolving Around An Axis
  5. Proof Of The Pudding
  6. Playing Chicken
  7. Operating With Extreme Caution
  8. Be Cool
  9. The Next Step
By: Vikram Vaswani, (c) Melonfire
Rating: starstarstarstarstar / 6
August 15, 2001

print this article


Given this basic structure, XPath now makes it possible to locate a node, or set of nodes, at any level of the tree, using a thingamajig known as a "location path."

A location path may be either an absolute path, which expresses a location with reference to the root node, or a relative path, which expresses a location with reference to the current node (since this location is always in context to something else, it is also referred to as the "context node"). Location paths are made up of a series of "location steps", each identifying one level in the XPath tree and separated from each other by a forward slash (/).

A location step can be further broken down into three components: there's an "axis", which defines the relationship to use when selecting nodes; a "node test", which specifies the types of nodes to select; and optional "predicates" to filter out unwanted nodes from the resulting collection (I'll explain each of these in detail further down so that they become a little less frightening.)

The syntax of a location step is as follows


This article copyright Melonfire 2001. All rights reserved.

>>> More XML Articles          >>> More By Vikram Vaswani, (c) Melonfire

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Google Docs and Xpath Data Functions
- Flex Array Collection Sort and Filtering
- The Flex Tree Control
- Flex List Controls
- Working with Flex and Datagrids
- How to Set Up Podcasting and Vodcasting
- Creating an RSS Reader Application
- Building an RSS File
- An Introduction to XUL Part 6
- An Introduction to XUL Part 5
- An Introduction to XUL Part 4
- An Introduction to XUL Part 3
- An Introduction to XUL Part 2
- An Introduction to XUL Part 1
- XML Matters: Practical XML Data Design and M...

Developer Shed Affiliates


Dev Shed Tutorial Topics: