XPath filter on multiple attributes
- From: anxauto@xxxxxxxxx
- Date: 12 Apr 2007 07:48:59 -0700
I have the following XML:
<?xml version="1.0" encoding="UTF-8"?>
<SETTINGS>
<DATABASE NAME="DEMO" DESCRIPTION="Demo database">
<USER NAME="arnaud" />
</DATABASE>
<DATABASE NAME="TEST" DESCRIPTION="Test database">
<USER NAME="peter" DEFAULT="1" />
<USER NAME="arnaud" />
</DATABASE>
</SETTINGS>
What I want is to get the <DATABASE> node where the <USER
NAME="arnaud" DEFAULT="1">. So in the above XML there is non. But I
use the following XPath statement:
DATABASE[USER/@NAME = 'arnaud' and USER/@DEFAULT = '1']
And <DATABASE> TEST is returned. I expect that there is nothing to be
returned.
What do I wrong, I am new with XPATH.
Regards
Arnaud
.
- Follow-Ups:
- Re: XPath filter on multiple attributes
- From: Martin Honnen
- Re: XPath filter on multiple attributes
- Prev by Date: Re: InvalidOperationException: ReadElementContentAsString method is not supported on node type None
- Next by Date: Re: InvalidOperationException: ReadElementContentAsString method is not supported on node type None
- Previous by thread: Altsoft Xml2PDF 2007
- Next by thread: Re: XPath filter on multiple attributes
- Index(es):
Relevant Pages
|