Specifying Children or Descendants of Parent Nodes

Sometimes you want a query to return information about a sibling of the context node. One way to obtain a sibling is to define a query that navigates up to the parent and then down to the sibling.

For example, suppose the context node is the first author element. You want to find out the title associated with this author. The following query returns the associated title element:

../title
               

            

The double dot ( ..) at the beginning of the query instructs the XPath processor to select the parent of the context node. This query returns the title elements that are children of the first book element, which is the parent of the first author element. In the bookstore.xml document, there is only one such title element.

Now suppose that the context node is still the first author element and you want to obtain the style attribute for the book that contains this author. The following query does this:

../@style
               

            

The double dot notation need not appear at the beginning of a query. It can appear anywhere in a query string, just like the dot notation.

HTML to XML Importer

Convert HTML to XML with the Stylus Studio HTML to XML Importer, a powerful, visual utility for Converting HTML to XML with ease.

Report Generation - Visually Defining Relationships in XML Publisher

Develop report generation applications with a powerful relationship manager in XML Publisher which provides a powerful and easy way to group and join data from one or more data sources.

ETL - Extract, Transform, Load

Designing Extract, Load and Tranform (ETL) applications including ETL data warehousing, etl design and etl programming is easy with Stylus Studio's XML and ETL Tools. Start ETL Programming today.

Medical Companies That Use Stylus Studio

Medical companies can't solve every ache and pain. That's why when it comes to the struggle of data integration, they turn to Stylus Studio to simplify their pains. Come see which medical companies are injecting Stylus Studio into their work load!

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member