using System; using System.Collections.Generic; using System.Text; using System.Xml; namespace fmtxml { public partial class RtfToSvg { public void AppendPlantSpecific(string genFileName, XmlDocument myDoc) { string genName = genFileName.Substring(genFileName.LastIndexOf('\\') + 1); genName = genName.Substring(0, genName.IndexOf('.')); switch (genName.ToUpper()) { case "WCN2": AddWCN2(myDoc); break; } } private void AddWCN2(XmlDocument myDoc) { XmlDocument xd = new XmlDocument(); // include the svg level so that the xmlns can be set to be the same as the generated document. xd.LoadXml("\r\n" + "\r\n" + "\r\n" + "\r\n" + "\r\n" + "\r\n" + "\r\n" + ""); myDoc.DocumentElement.AppendChild(myDoc.ImportNode(xd.DocumentElement.ChildNodes[0], true)); } } }