Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Xpath sibling conditional? Xpath sibling conditional?To: NULL Date: 12/13/2008 12:33:00 PM If I have a document:
<InqRs>
<DetRs>
<RefInfo>
<RefType>StopNum</RefType>
<RefId>0</RefId>
</RefInfo>
<RefInfo>
<RefType>Id</RefType>
<RefId>0</RefId>
</RefInfo>
</DetRs>
<DetRs>
<RefInfo>
<RefType>StopNum</RefType>
<RefId>0</RefId>
</RefInfo>
<RefInfo>
<RefType>Id</RefType>
<RefId>1</RefId>
</RefInfo>
</DetRs>
</InqRs>
How can I select just for the <DetRs> that has <RefType>=Id and
<RefId>=0, ie, the 'first' one above.
I've tried several different attempts, among others:
InqRs/DetRs[RefInfo/RefType='Id' and RefInfo/RefId='0']
InqRs/DetRs[RefInfo/RefType='Id'][RefInfo/RefId='0']
But these select both of the <DetRs> sections (because of the StopNum
RefId of 0, I presume).
Thanks!
Mark
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
