M
Michael C
Hi all,
I'm back with another XML question. We covered this briefly before, but I'm
still having problems with it. Basically what I need to do is be able to
add, delete and update nodes and their attributes in an XML file. Here's a
sample of an XML file I might use:
<root>
<settings>
<setting name="timeout">50</setting>
<setting name="loginattempts">3</setting>
</settings>
<servers>
<server name="sql1" username="sa" password="password"/>
<server name="sql2" username="user" password="upassword"/>
</servers>
</root>
I need to change the values of the <setting> nodes by name and add/delete or
modify the <server> tag attributes. As it stands right now, I read in the
entire file using an XmlTextReader; and when I update it, I re-write the
entire file using a StreamWriter. Can someone post, or direct me to, some
sample code that can get me on the road to properly using my XML file?
Meanwhile, I'll just be hitting the books
Thanks in advance,
Michael C.
I'm back with another XML question. We covered this briefly before, but I'm
still having problems with it. Basically what I need to do is be able to
add, delete and update nodes and their attributes in an XML file. Here's a
sample of an XML file I might use:
<root>
<settings>
<setting name="timeout">50</setting>
<setting name="loginattempts">3</setting>
</settings>
<servers>
<server name="sql1" username="sa" password="password"/>
<server name="sql2" username="user" password="upassword"/>
</servers>
</root>
I need to change the values of the <setting> nodes by name and add/delete or
modify the <server> tag attributes. As it stands right now, I read in the
entire file using an XmlTextReader; and when I update it, I re-write the
entire file using a StreamWriter. Can someone post, or direct me to, some
sample code that can get me on the road to properly using my XML file?
Meanwhile, I'll just be hitting the books

Thanks in advance,
Michael C.