XML,
<A>
<B id="ABC">
<C name="A" />
<C name="B" />
<C name="C" />
<C name="G" />
</B>
<B id="ZYZ">
<C name="1" />
<C name="2" />
<C name="3" />
<C name="4" />
</B>
</A>
I Need to select only <C> nodes and assign to a variable.
I'm using following c# code which is not working,
var asdf = c.Elements("C");
asdf should contain ,
<C name="A" />
<C name="B" />
<C name="C" />
<C name="G" />
<C name="1" />
<C name="2" />
<C name="3" />
<C name="4" />
Any help appreciated!
chere? You haven't given us enough context. It sounds like you're just looking for theDescendants("C")method instead ofElements("C").