Creates an element with the specified XmlNode.Prefix, XmlDocument.LocalName , and XmlNode.NamespaceURI.
A new System.Xml.XmlElement.
Note to Inheritors If you overload this function, it cannot be used for extensibility. Instead, you can return an element created by the base class, in this case, XmlDataDocument. See the following example.
Example
class MyXmlDataDocument : XmlDataDocument { public override XmlElement CreateElement(string prefix, string localName, string nsURI) { //Ensure we are returning the base class implementation of element. XmlElement e = base.CreateElement(prefix, localName, nsURI); //Add additional code here. return e; //Return the element created by XmlDataDocument. } }