[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XPath question..perhaps naive..

  • From: "Christopher R. Maden" <crism@l...>
  • To: XML-LIST Copy <xml-dev@l...>
  • Date: Sat, 18 Nov 2000 01:52:39 -0800

xpath find all parents
At 19:43 16-11-2000 -0800, Jack Lincoln wrote:
>Hey there..

Hey, Jack.  [For those of you who don't know, Jack is the one who did the 
actual work behind the prototype XML browser presented at 
<URL:http://www.oreilly.com/%7Ecrism/xtech2k/>.]

>is there an XPath that would select all parent nodes having a certain
>tagname?
>sort of the reverse of ".//myTagName"

It's not clear exactly what you're asking for.

In a match pattern, all elements that are parents of a certain element type:

    *[myTagName]

This will also work in a select pattern to find all elements that are 
children of the current node and are parents of a certain element type.

In a select pattern to find all elements that are descendants of the 
current node that are parents of a certain element type:

    .//*[myTagName]

In a select pattern to find all elements anywhere in the document that are 
parents of a certain element type:

    //*[myTagName]

>if this is not the appropriate forum for a question such as this..
>sorry.. but please tell me where a more appropriate forum could be found.

You might try the XSL list: <URL:http://www.mulberrytech.com/xsl/xsl-list/>.

-Chris
--
Christopher R. Maden, Senior XML Analyst, Lexica LLC
222 Kearny St., Ste. 202, San Francisco, CA 94108-4510
+1.415.901.3631 tel./+1.415.477.3619 fax
<URL:http://www.lexica.net/> <URL:http://www.oreilly.com/%7Ecrism/>


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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-2013 All Rights Reserved.