Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XmlDocument xpath?

Status
Not open for further replies.

strut

Programmer
Joined
Jan 29, 2002
Messages
5
Location
US
i have an XmlDocument with this structure

<STATES>
<state name="FLORIDA">
<abv>FL</abv>
<data>test data</data>
<County name="DUVAL" code="084">
<RecordingInformation>
<Deed fee="10.00" perPage="1.10" />
<Mortgage fee="10.00" perPage="1.10" />
<Release fee="10.00" perPage="1.10" />
</RecordingInformation>
</County>
<County name="ST JOHNS" code="080">
<RecordingInformation>
<Deed fee="12.00" perPage="1.10" />
<Mortgage fee="12.00" perPage="1.10" />
<Release fee="12.00" perPage="1.10" />
</RecordingInformation>
</County>

</state>
<state name="GEORGIA">
<abv>GA</abv>
<data>to be determined</data>
</state>
<state name="HAWAII">
<abv>HI</abv>
<data>test data</data>
</state>
</STATES>

If the state is FL and the County is Duval I want to be able to get the recording information. I do not want to loop through all the counties checking to see if it == Duval. Any help would be great. Thanks,Chris
 
XmlNode counties = currentnode.SelectSingleNode("Florida");

XmlNode duvalnode = node.SelectSingleNode("DUVAL");


Something to that effect.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top