Exemple #1
0
 private void WriteCompound(XmlElement _node, Compound _compound)
 {
     foreach (Compound child in _compound)
     {
         XmlElement node = XmlUtility.CreateElement(_node, child.Kind);
         XmlUtility.CreateAttribute(node, "name", child.Name);
         XmlUtility.CreateAttribute(node, "id", child.RefID);
         WriteCompound(node, child);
     }
 }
Exemple #2
0
        public void DumpCompoundTree(string _fileName)
        {
            if (File.Exists(_fileName))
            {
                File.Delete(_fileName);
            }

            XmlDocument doc = new XmlDocument();

            XmlUtility.CreateXmlDeclaration(doc);
            XmlElement root = XmlUtility.CreateElement(doc, "Root");

            WriteCompound(root, mRootCompound);

            doc.Save(_fileName);
        }