From the course: XML Essential Training
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
What is XPath?
- [Instructor] A little earlier in the course, I talked about some complimentary technologies for working with XML. One of those is XPath, which is what we're going to cover in this chapter. XPath is a W3C standard for accessing data in XML. It's a pretty fundamental part of some other XML technologies like XSLT, which we'll look at a little later, and XQuery and some others. Essentially, XPath provides a way to query and extract information from XML content by using path-like expressions. And you can think of this as being similar to a way that directory paths work in a file system. If you're interested, you can learn a lot more about XPath and how it works at this URL on the W3C's website. What I'm going to do in the rest of this chapter is just give some practical examples for how XPath works and then we'll take it for a spin and we'll even use it in some web pages. Probably the best way to see what I mean by defining a path into a document is to look at a few real examples. So…