public void WriteXml(StringBuilder sb, int indent, string ddsfolder) { if (Textures?.data_items != null) { foreach (var tex in Textures.data_items) { YtdXml.OpenTag(sb, indent, "Item"); tex.WriteXml(sb, indent + 1, ddsfolder); YtdXml.CloseTag(sb, indent, "Item"); } } }
public static void WriteXmlNode(TextureDictionary d, StringBuilder sb, int indent, string ddsfolder, string name = "TextureDictionary") { if (d == null) { return; } if ((d.Textures?.data_items == null) || (d.Textures.data_items.Length == 0)) { YtdXml.SelfClosingTag(sb, indent, name); } else { YtdXml.OpenTag(sb, indent, name); d.WriteXml(sb, indent + 1, ddsfolder); YtdXml.CloseTag(sb, indent, name); } }