Understanding XPath

printer-friendly version of this section  Print  e-mail this section  E-Mail  add a public, group or private note  Add Note  add a bookmark about this section  Add Bookmark    

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.


    printer-friendly version of this section  Print  e-mail this section  E-Mail  add a public, group or private note  Add Note  add a bookmark about this section  Add Bookmark    
    Top

    [0672324504/ch08lev1sec2]

     
     


    JSTL. JSP Standard Tag Library Kick Start
    JSTL: JSP Standard Tag Library Kick Start
    ISBN: 0672324504
    EAN: 2147483647
    Year: 2001
    Pages: 93
    Authors: Jeff Heaton

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net