OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Simple XPath question

[ Lists Home | Date Index | Thread Index ]

An alternate solution, if you know for sure that C is the child of B and B is the child of A,

/A [B/C/@name ="something"]

Note: Not tested

Thanks,
Prakash

Paul Popiel wrote:
want to get element A not C.

also would prefer to stay away from using .. if possible.

-----Original Message-----
From: Alexander Johannesen [mailto:alexander.johannesen@gmail.com]
Sent: Wednesday, 3 August 2005 11:42 AM
To: Paul Popiel
Cc: xml-dev@lists.xml.org
Subject: Re: [xml-dev] Simple XPath question


On 8/3/05, Paul Popiel <PaulP@advancedengine.com> wrote:
  
whats a clean xpath expression to get the element A which has a child
element C with @name=something
    

Clean? Hmm. :)

   //C[@name='something' and ../../node::name() = 'A']

{untested, of course}


Alex
  
begin:vcard
fn:Prakash Subramaniam
n:Subramaniam;Prakash
org:Oracle India Private Limited;MDS (MetaDataServices)
adr:;;Lexington Towers;Bangalore;;;India
email;internet:prakash.subramaniam@oracle.com
title:Member Technical Staff
tel;work:+91 80 51085015
x-mozilla-html:TRUE
version:2.1
end:vcard





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS