I have some code which manipulates a number of large xml files using xmldoc, as such it is slow and something of a memory hog. I have been asked to move most of the xmldoc code to xmltextreader and xmltextwriter and for the most part the conversion is going ok but I am running into a problem. At some point in the code it currently has something like
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(value);
where value is a short xml string ie "<elem>some text<child/>more text<child/>additional text</elem>"
(or something like that)
is there anyway to get that into a xmltextreader (outside of writing it to a file and reading the file)?
The project is running on vs.net2003 (though if 2005 would be a major boost in speed or make this easier I could probably convince them to buy it). None of the constructors I have seen for xmltextreader seem to allow that. I guess since the xml is so short it might be fine to leave this part as an xmldoc as storing it in memory is not an issue but... Thanks for any suggestions.
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(value);
where value is a short xml string ie "<elem>some text<child/>more text<child/>additional text</elem>"
(or something like that)
is there anyway to get that into a xmltextreader (outside of writing it to a file and reading the file)?
The project is running on vs.net2003 (though if 2005 would be a major boost in speed or make this easier I could probably convince them to buy it). None of the constructors I have seen for xmltextreader seem to allow that. I guess since the xml is so short it might be fine to leave this part as an xmldoc as storing it in memory is not an issue but... Thanks for any suggestions.