Click here to Skip to main content
15,896,410 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need some help, i've found a few code blocks over the internet to read and write xml nodes, it's fine and all, but doesn't work for xml like this:


<account balance='4930' />(Code tags aren't working :S)

only xml formatted like this:

<account><balance>4930</balance></account>

Now, the question, I need some help either to find a code snippet or a class, or write my own one, that can read the values from the nodes.


Thanks in advanced :)

-- Adam
Posted
Updated 22-Feb-10 23:13pm
v6

1 solution

You need to look for the account node, then use node.Attributes["balance"].Value to access the value in the attribute.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900