Here's a routine I use in one of my apps.
Dim sr As New StringReader(rcvd.Msg)
Dim xmlReader As New XmlTextReader(sr)
With xmlReader
..WhitespaceHandling = WhitespaceHandling.None
Dim Cont As Boolean = .Read
While Cont
If .IsStartElement Then
Select Case .Name
Case "Master"
..MoveToAttribute("id")
Dim IDValue as String/Integer = .Value
'--Do Something here depending on your IDValue
Case "SomeOtherElementName"
'--Do whatever...
End Select
End If
Cont = .Read
End While
..Close()
End With
sr.close
"thomson" <sa**********@yahoo.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com...
Hi all,
I do have an XML file which i have given below, AS you can
see there is an id attribute with the master element , If i pass the id
for eg: 1 i need to get all the field elements associated with it,
Can any one let me know how best we can traverse it and
return the values
<MasterConf>
<Master id="1" Name="Country">
<Table>ADM_COUNTRY_MST</Table>
<field>Country_Code</field>
<field>User_TCode</field>
<Primary>Country_TCode</Primary>
</Master>
<master id="2" Name="City">
-
</MAsterConf>
Thanks in Advance
thomson