Beispiel #1
0
        public static string GetXml(YftFile yft, string outputFolder = "")
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine(XmlHeader);

            if (yft?.Fragment != null)
            {
                FragType.WriteXmlNode(yft.Fragment, sb, 0, outputFolder);
            }

            return(sb.ToString());
        }
Beispiel #2
0
        public static YftFile GetYft(XmlDocument doc, string inputFolder = "")
        {
            YftFile r = new YftFile();

            var ddsfolder = inputFolder;

            var node = doc.DocumentElement;

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

            r.Name = Path.GetFileName(inputFolder);

            return(r);
        }