using System;
using System.Xml;
public class Utility
{
///
/// Creates the element.
///
/// The parent.
/// The name.
/// The inner text.
/// The ns MGR.
///
public static XmlElement CreateElement(XmlElement parent, string name, string innerText, XmlNamespaceManager nsMgr)
{
if (parent == null)
throw new Exception("Passed in a null node, which should never happen.");
XmlElement element = parent.OwnerDocument.CreateElement(name, nsMgr.LookupNamespace("ns1"));
XmlElement newElement = (XmlElement)parent.AppendChild(element);
newElement.InnerText = innerText;
return (XmlElement)parent.AppendChild(newElement);
}
}