Saturday, June 2, 2012

What is XPATH?

  • XPath is used to navigate through elements and attributes in an XML document.
  • XPath can locate any type of information in an XML document with one line of code.
  • These one liners are referred to as "expressions," and every piece of XPath that you write will be an expression.
  • Xpath contains library of standard function.
  • Following example demonstrate the xpath expression.

if we wanted to know the amount of chips from left side xml , the XPath expression would be:           


If we wanted to select the price of pop, we would have to make an even longer path of elements to reach our final destination.