private string generate_xml_config(String name, String desc, config_gen_del func) { XmlDocument root_doc = new XmlDocument(); XmlNode doc = root_doc.CreateElement("document"); root_doc.AppendChild(doc); XmlUtils.AddNodeAttrib(doc, "type", "freeswitch/xml"); XmlNode sect = XmlUtils.AddNodeNode(doc, "section"); XmlUtils.AddNodeAttrib(sect, "name", "configuration"); XmlNode config_node = XmlUtils.AddNodeNode(sect, "configuration"); XmlUtils.AddNodeAttrib(config_node, "name", name); XmlUtils.AddNodeAttrib(config_node, "description", desc); func(config_node); //root_doc.Save(@"c:\temp\fs_" + name); return(root_doc.OuterXml); }
private string generate_xml_config(String name, String desc, config_gen_del func) { XmlDocument root_doc = new XmlDocument(); XmlNode doc = root_doc.CreateElement("document"); root_doc.AppendChild(doc); XmlUtils.AddNodeAttrib(doc, "type", "freeswitch/xml"); XmlNode sect = XmlUtils.AddNodeNode(doc, "section"); XmlUtils.AddNodeAttrib(sect, "name", "configuration"); XmlNode config_node = XmlUtils.AddNodeNode(sect, "configuration"); XmlUtils.AddNodeAttrib(config_node, "name", name); XmlUtils.AddNodeAttrib(config_node, "description", desc); func(config_node); //root_doc.Save(@"c:\temp\fs_" + name); return root_doc.OuterXml; }