public static string GetXml(YldFile yld, string outputFolder = "") { StringBuilder sb = new StringBuilder(); sb.AppendLine(XmlHeader); if (yld?.ClothDictionary != null) { ClothDictionary.WriteXmlNode(yld.ClothDictionary, sb, 0); } return(sb.ToString()); }
public static YldFile GetYld(XmlDocument doc, string inputFolder = "") { YldFile r = new YldFile(); var ddsfolder = inputFolder; var node = doc.DocumentElement; if (node != null) { r.ClothDictionary = ClothDictionary.ReadXmlNode(node); } r.Name = Path.GetFileName(inputFolder); return(r); }