Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


select nodes with child node A and child node B

From: "gplott@-----.---" <------@-----.--->
To: NULL
Date: 11/1/2006 12:58:00 PM

I have an XML document that has multiple childe nodes like the one at
the end of this message

What syntax would I use with selectNodes to select all viewentry nodes
that have an

entrydata child node with a name attribute equal to
"CourseOrMeetingName"
that has a text childe node with the text Course ABC

AND that also have an

entrydata child with a name attribute equal to Start Date
that has a datetime child node with the text 20070110

I was trying something like

//viewentry[ (entrydata[@name='CourseOrMeetingName'][text='Course
ABC']) and (entrydata[@name='StartDate'][datetime='20070110'])]"

<viewentry position="1" unid="E5FE575692CAB4CD852572140052F751"
noteid="893A" siblings="24">
<entrydata columnnumber="0" name="CourseOrMeetingName">
<text>Course ABC</text></entrydata>
<entrydata columnnumber="1" name="StartDate">
<datetime>20070110</datetime></entrydata>
<entrydata columnnumber="2" name="City">
<text>West chester</text></entrydata>
<entrydata columnnumber="3" name="FirstName">
<text>Joe</text></entrydata>
<entrydata columnnumber="4" name="MiddleName">
<text></text></entrydata>
<entrydata columnnumber="5" name="LastName">
<text>Blow</text></entrydata>
</viewentry>

Thanks,

Glenn



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent