diff --git a/gaseous-signature-parser/classes/parsers/WHDLoadParser.cs b/gaseous-signature-parser/classes/parsers/WHDLoadParser.cs index b7970b5..4b9077d 100644 --- a/gaseous-signature-parser/classes/parsers/WHDLoadParser.cs +++ b/gaseous-signature-parser/classes/parsers/WHDLoadParser.cs @@ -92,18 +92,19 @@ public RomSignatureObject Parse(string XMLFile) } } - if (romNode.HasChildNodes) + // process attribute elements + foreach (XmlNode childNode in romNode.ChildNodes) { - Dictionary romAttributes = new Dictionary(); - foreach (XmlNode romChildNode in romNode.ChildNodes) + string childNodeName = $"whdload.{nodeName}"; + if (childNode.GetType() == typeof(XmlElement)) { - romAttributes.Add(romChildNode.Name, romChildNode.InnerText); + childNodeName = $"{childNodeName}.{childNode.Name}"; + rom.Attributes.Add(childNodeName, childNode.InnerText); + } + else + { + rom.Attributes.Add(childNodeName, childNode.InnerText); } - rom.Attributes.Add(nodeName, romAttributes); - } - else - { - rom.Attributes.Add(nodeName, romNode.InnerText); } }