mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Fix imports of malformed XML by skipping errors
Also ended up adding an error to tell the users to double check their input file
This commit is contained in:
@@ -356,6 +356,15 @@ namespace SabreTools
|
||||
}
|
||||
else
|
||||
{
|
||||
// There are rare cases where a malformed XML will not have the required attributes. We can only skip them.
|
||||
if (node.Attributes.Count == 0)
|
||||
{
|
||||
_logger.Error(@"A node with malformed XML has been found!
|
||||
For RV DATs, please make sure that all names and descriptions are quoted.
|
||||
For XML DATs, make sure that the DAT has all required information.");
|
||||
node = node.NextSibling;
|
||||
continue;
|
||||
}
|
||||
tempname = node.Attributes["name"].Value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user