Link to home
Start Free TrialLog in
Avatar of ipaman
ipaman

asked on

Getting and setting attributes of XmlDocument

I have a config file that looks like the following:

<root>
      <app name=henry>
            <filter value=zxczxc>
                  <level value=TOP/>
            </filter>
      </app>
      <app name=hank>
            <filter value=qweqwe>
                 <level value=BOTTOM/>
            </filter>
      </app>
</root>

I want to be able to 'get' the attribute value for 'level' in the 'hank' section ONLY and I also
want to be able to set a new value for the same.

How can I accomplish this (code) using the XmlDocument and/or XmlElement classes?
ASKER CERTIFIED SOLUTION
Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial