JSTL: JSP Standard Tag Library Kick Start By Jeff Heaton
Table of Contents
Chapter 8. Accessing Data with XML Tags
XPath is a sort of query language for XML. On an abstract level, XPath resembles SQL. Like SQL, XPath is a language for accessing data. XPath expressions are not executed by themselves; XPath is always used in conjunction with another programming language. Generally, XPath is used with XSLT, but other languages are now taking advantage of XPath expressions. JSTL is one of these languages.
Complete coverage of XPath is beyond the scope of this book; we provide only a brief introduction to XPath. For more information on XPath, you should refer to the World Wide Web Consortium (W3C) site at http://www.w3.org/TR/xpath.
XPath expressions are similar to paths used to reference files. For example, the XPath expression doc/students/student/name/first would access the first student's first name. The $doc portion of the expression is provided by JSTL, and represents the actual XML document as the starting point. There are many other more complex forms of XSLT, some of which we examine in later chapters of this book.