XML TutorialLesson 13Free preview
XML XPath
This lesson is part of XML · All levels
Summary
XPath is a query language for specifying parts of an XML document based on a path pattern. With expressions like /store/book/title, we can pick specific elements from the tree structure without looking manually. XPath is very important because it is also used by XSLT, XQuery, and many XML processing libraries.
Key points
- XPath specifies the path to the node in an XML document
- The expression starts from the root with/or relative to //
- XPath supports predicates such as [1] or [@price>100]
- The result of a query is called a node-set, string, number, or boolean
- XPath became the basis of XSLT and many XML tools
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.