M
Michael C
Hi all,
Please excuse all the questions... I come from a VB 6 background and am
trying to teach myself C#.NET. I appreciate all your help. My question now
is this -- I have a simple XML file like this:
<?xml version='1.0'?>
<enterprise>
<config>
<load value1="10" value2="14" />
</config>
<servers>
<server name="sqlsrv1" username="" pwd="" integratedsec="yes">
<server name="sqlsrv2" username="sa" pwd="sa" integratedsec="no">
</servers>
</enterprise>
I'm able to read in the information using an XmlTextReader, and when I
update the information I have to re-write the entire file again from
scratch. Just looking at my code I gotta believe there's an easier way...
as it stands I'd be better off with a plain text file . Can someone point
me in the right direction for info on efficient uses of the System.Xml
namespace (for instance, to extract certain tags and their attributes or to
add/modify tags or their attributes)? So far I've gone through Microsoft's
examples but I'm still not getting it. Thanks!
Michael C.
Please excuse all the questions... I come from a VB 6 background and am
trying to teach myself C#.NET. I appreciate all your help. My question now
is this -- I have a simple XML file like this:
<?xml version='1.0'?>
<enterprise>
<config>
<load value1="10" value2="14" />
</config>
<servers>
<server name="sqlsrv1" username="" pwd="" integratedsec="yes">
<server name="sqlsrv2" username="sa" pwd="sa" integratedsec="no">
</servers>
</enterprise>
I'm able to read in the information using an XmlTextReader, and when I
update the information I have to re-write the entire file again from
scratch. Just looking at my code I gotta believe there's an easier way...
as it stands I'd be better off with a plain text file . Can someone point
me in the right direction for info on efficient uses of the System.Xml
namespace (for instance, to extract certain tags and their attributes or to
add/modify tags or their attributes)? So far I've gone through Microsoft's
examples but I'm still not getting it. Thanks!
Michael C.