Hey,
I started trying to solve this problem in another thread but it is big enough for its own :)
I have an xml file similar to the one above where I need the child member elements of just the 2nd List.
I tried using this
But because all 3 nodes in my xml file have the same name, it pulls up child nodes from the entire file. How would I limit it to get the child nodes from just the List
Thanks
I started trying to solve this problem in another thread but it is big enough for its own :)
xml Code:
<?xml version="1.0" encoding="utf-8"?> <UserEx> <List> <member name="INFO HERE"> <summary>SUMMARY HERE</summary> </member> <member name="INFO HERE123"> <summary>SUMMARY HERE 123</summary> </member> </List> <List id="ers" Key="1" fier="Cont"> <member name="INFO HERE"> <summary>SUMMARY HERE</summary> </member> <member name="INFO HERE123"> <summary>SUMMARY HERE 123</summary> </member> </List> <List id="er2ds" Key="3" fier="Conet"> <member name="INFO HERE"> <summary>SUMMARY HERE</summary> </member> <member name="INFO HERE123"> <summary>SUMMARY HERE 123</summary> </member> </List> </UserEx>
I have an xml file similar to the one above where I need the child member elements of just the 2nd List.
I tried using this
vb.net Code:
Dim xdata = From n In doc.<UserEx>.<List>.<member> Select New data With { .Name = n.@name, .Summary = n.<summary>.Value, .Type = .Name.Substring(0, 1) }
But because all 3 nodes in my xml file have the same name, it pulls up child nodes from the entire file. How would I limit it to get the child nodes from just the List
xml Code:
<List id="ers" Key="1" fier="Cont">
Thanks