My plan is to read in an XML document using my C# program, search for particular entries which I\'d like to change, and then write out the modified document. However, I\'ve bec
If you have smaller documents which fit in computers memory you can use XmlDocument
.
Otherwise you can use XmlReader
to iterate through the document.
Using XmlReader
you can find out the elements type using:
while (xml.Read()) {
switch xml.NodeType {
case XmlNodeType.Element:
//Do something
case XmlNodeType.Text:
//Do something
case XmlNodeType.EndElement:
//Do something
}
}