The contents of the node as an Xml string. When getting the value of this property, InnerXml returns the same string that XmlNode.WriteContentTo would write to an System.Xml.XmlTextWriter.
When setting the value of this property, the value is parsed as Xml, and the current children of the node are replaced by the nodes parsed from the string.
Attempting to set this property from a node that cannot have child nodes, for example a Text node, throws an exception. Otherwise, setting InnerXml replaces the child nodes, of the node, with the parsed contents of the given string. The parsing is done in the current namespace context.
This property is a Microsoft extension to the Document Object Model (DOM).
InnerXml is not an efficient way to modify the DOM. There may be performance issues when replacing complex nodes. It is more efficient to construct nodes and use methods such as InsertBefore, InsertAfter, AppendChild, and RemoveChild to modify the Xml document.