Separate to see where issue is coming from

This commit is contained in:
Matt Nadareski
2016-04-22 16:12:31 -07:00
parent 7f1ce9e3bc
commit 2655aa12da

View File

@@ -37,15 +37,20 @@ namespace SabreTools.Helper
public static XmlDocument GetXmlDocument(string filename, Logger logger) public static XmlDocument GetXmlDocument(string filename, Logger logger)
{ {
XmlDocument doc = new XmlDocument(); XmlDocument doc = new XmlDocument();
string alltext = "";
string[] alllines;
try try
{ {
doc.LoadXml(File.ReadAllText(filename)); alltext = File.ReadAllText(filename);
doc.LoadXml(alltext);
} }
catch (XmlException) catch (XmlException)
{ {
try try
{ {
doc.LoadXml(Converters.ClrMameProToXML(File.ReadAllLines(filename)).ToString()); alllines = File.ReadAllLines(filename);
alltext = Converters.ClrMameProToXML(alllines).ToString();
doc.LoadXml(alltext);
} }
catch (Exception ex) catch (Exception ex)
{ {