Tuesday, November 16, 2004

Short Tutorial on XPath

This article aims at a brief overview on XPath - standing for XML Path Language. I am presenting this in a FAQ format - I always feel that FAQs sink much easier than an essay - and FAQs help folks start on any technoogy rightaway.
  1. What is XPath ? Why is it required ?

XPath is a language devised for addressing [ locating/referring to ] portions of XML Documents. XML Documents can get really big and complex - XPath makes the job of the User a whole lot easier by providing rich semantics and syntactical constructs to identify and pick nodes within any document of arbitrary complexity.

2. Give me a few examples of simple XPaths .

XPath assumes a compact Non-XML URI like syntax - so you can address nodes with huge schemas in lesser space.

For instance, consider the following XML Document.

As I mentioned earlier, you can point to any node in this XML Document through an XPath.


0 Comments:

Post a Comment

<< Home