Hi there,
I currently have to iterate through a larger amount of .xml files and I am bound to Mono (so no brand new .NET LINQ etc.).
I use XmlDocument
to load each XML file, now my question is, can I use one instance of XmlDocument for all files?
Code Example below:
filePath = "Assets/Units/";
// Get all files
string [] files = GetAllFiles(filePath);
// And iterate through them
xFile = new XmlDocument(); // create xFile once
foreach (string file in files)
{
xFile = new XmlDocument(); // or create it each time a new file must be opened / parsed?
// do something
}