Example #1
0
        public static string GetXml(YdrFile ydr, string outputFolder = "")
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine(XmlHeader);

            if (ydr?.Drawable != null)
            {
                Drawable.WriteXmlNode(ydr.Drawable, sb, 0, outputFolder);
            }

            return(sb.ToString());
        }
Example #2
0
        public static YdrFile GetYdr(XmlDocument doc, string inputFolder = "")
        {
            YdrFile r = new YdrFile();

            var ddsfolder = inputFolder;

            var node = doc.DocumentElement;

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

            r.Name = Path.GetFileName(inputFolder);

            return(r);
        }