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

Transforming Non-XML Documents with XML Tools

This pages has audio from the Stylus Studio Presentation at Exchange 2005.

Mail, Package & Freight Delivery

Want to know what mail, package & freight delivery companies are shipping away there XML woes? Now you can! Check out these top mail, package & freight delivery companies that are packaged with the power of Stylus Studio.

XML Schema Designer

The XML Schema Designer is a tool for accelerating advanced XML Schema development through an intuitive visual interface for modeling any XML data structures.

XQuery Blasts off at NASA's Johnson Space Center

This is a short story how DynCorp (CSC) used XQuery at NASA's Johnson Space Center to Simplify XML Data Access and Integration

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member