Hello everyone,
I need some advice on which class to use when working with an XML file
in a specific way. Basically I am writing a program, that needs to
save it's state into a file, so it can be read when it starts up
(based on where it ended). It's just 3 elements, with a short text and
a number associated to it. Something like this:
<element><name>something</name><number>3</number></element>
The thing is, there are 3 different elements (based on the name) and
they can't be repeated (so one version of each only). I will also be
updating them repeatedly.
So I need a simple way of searching for the elements in the XML file
(to make sure they are there,and if not to add them) and updating
their values (don't forget, I need to search for the element tag, not
the name tag, which means after I find it I am working with child
elements).. I was thinking either XmlDocument class, or using ADO.NET,
since the XmlTextReader/Writer class seem to be a bit acquired in this
situation. But after trying to use XmlDocument, even that seems
acquired for such a little task, so what do you think about using
ADO.NET (I must admit, I haven't tried it yet so, would have to learn
the basics)?
Anyway, any comments are appreciated.
Regards,
Amadej.