Exemplo n.º 1
0
        public static string GetXml(YddFile ydd, string outputFolder = "")
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine(XmlHeader);

            if (ydd?.DrawableDict != null)
            {
                DrawableDictionary.WriteXmlNode(ydd.DrawableDict, sb, 0, outputFolder);
            }

            return(sb.ToString());
        }
Exemplo n.º 2
0
        public static YddFile GetYdd(XmlDocument doc, string inputFolder = "")
        {
            YddFile r = new YddFile();

            var ddsfolder = inputFolder;

            var node = doc.DocumentElement;

            if (node != null)
            {
                r.DrawableDict = DrawableDictionary.ReadXmlNode(node, ddsfolder);
            }

            r.Name = Path.GetFileName(inputFolder);

            return(r);
        }