jvalero
13 years agoVisitor
Parsing Child Node Attributes in XML
I have a section in my XML that looks like the following:
What is the best way to parse out the value from a child node, for this example let's say the first param node.
I've tried many combinations to try and parse this value. With no luck. I was going to try using the GetAttributes method, but the documentation isn't complete for it and on my first few attempts it does not appear to work like JavaScript's getAttributes() which was what I was expecting.
Appreciate the help.
<adhocparams>
<param name="appname" value="headlines2"/>
<param name="sourceSite1" value="somesite.com"/>
<param name="sourceSite2" value="somesite.com"/>
<param name="sourceSite3" value="somesite.com"/>
<param name="sourceSite4" value="somesite.com"/>
<param name="ip" value="192.123.123.123"/>
</adhocparams>
What is the best way to parse out the value from a child node, for this example let's say the first param node.
I've tried many combinations to try and parse this value. With no luck. I was going to try using the GetAttributes method, but the documentation isn't complete for it and on my first few attempts it does not appear to work like JavaScript's getAttributes() which was what I was expecting.
Appreciate the help.