Subject:Xpath and the not operator Author:Mark Kaplan Date:08 Aug 2006 02:49 PM Originally Posted: 08 Aug 2006 02:48 PM
I am trying to find a path in an xml document only having an id that satisfy two different paths. With the xml file that looks like:
<x>
<y id = 'aaa'/>
<z>
<a id = 'aaa'/>
</z>
</x>
I use the xpath statement “//*[@id='aaa']” which returns two nodes and . I want to use an xpath statement that will return but not . I think this can be done using the “not” operator but I could not figure out the correct xpath syntax. If it matters, I am using the xpath in C# code with the call SelectNodes().
Subject:Xpath and the not operator Author:Mark Kaplan Date:08 Aug 2006 03:30 PM
Ivan,
I am a licensed user of Stylus Studio. How do I become a registered user of this forum. It is possible that I used the email address of mkaplan@phaseforward when I registered the product and not my yahoo account.
Subject:Xpath and the not operator Author:Mark Kaplan Date:08 Aug 2006 03:58 PM
I do not know the specific node names. I only know the id value. That is why I am using //*[id='aaa']. The problem that I am having is that I want to exclude node <a> while retrieving node <y>