Examples of XPath Expression Results

Table 66 provides examples of XPath expression results:

Expression
Result

              /a
               

            
Returns the document element of the document if it is an a element

              /a/b
               

            
Returns all b elements that are immediate children of the document element, which is the a element

              //a
               

            
Returns all a elements in the document

              //a/b
               

            
Returns all b elements that are immediate children of a elements that are anywhere in the document

              a or ./a
               

            
Returns all a elements that are immediate children of the context node

              a/b
               

            
Returns all b elements that are immediate children of a elements that are immediate children of the context node

              a//b
               

            
Returns all b elements that descend from a elements that are immediate children of the context node

              .//a
               

            
Returns all a elements in the document tree branch that starts with the context node

              ../a
               

            
Returns all a elements in the document tree branch that are children of the parent node of the context node.
Table 66. XPath Expression Results

XML Project

Stylus Studio's Project Window is an intuitive, visual feature for organizing files belonging to a project. It supports different file-type icons and nested folders; many helpful options are available from the context menu.

Manufacturing

Manufacturing

XHTML Tools

Powerful XHTML Tools for converting HTML to XHTML, validating XHTML, transforming XML to XHTML, editing JSP, creating XML driven Websites and more.

Berkeley DB XML and Stylus Studio

Develop XML applications for Berkeley DBXML with Stylus Studio integrated tools support for SleepyCat Software's DBXML. Open, Query and Save XML to and from Berkeley DB XML directly from within the Stylus Studio XML IDE.

Stylus Most Wanted

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.