Esempio n. 1
0
        public static string GetXml(YedFile yed, string outputFolder = "")
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine(XmlHeader);

            if (yed?.ExpressionDictionary != null)
            {
                ExpressionDictionary.WriteXmlNode(yed.ExpressionDictionary, sb, 0);
            }

            return(sb.ToString());
        }
Esempio n. 2
0
        public static YedFile GetYed(XmlDocument doc, string inputFolder = "")
        {
            YedFile r = new YedFile();

            var node = doc.DocumentElement;

            if (node != null)
            {
                r.ExpressionDictionary = ExpressionDictionary.ReadXmlNode(node);

                r.InitDictionaries();
            }

            r.Name = Path.GetFileName(inputFolder);

            return(r);
        }