InnerXml
InnerXml is a property of the XmlNode class in the System.Xml namespace (and its derived types, such as XmlElement) in .NET. It exposes the XML markup that represents the node’s child content. When read, InnerXml returns a string containing the serialized XML for all of the current node’s children. When written, it replaces the node’s existing children with a new set created from the supplied XML fragment. The fragment is parsed by the owning XmlDocument, so it must be well-formed XML. If the fragment is invalid, an XmlException is thrown. If the value is null or the node is read-only, appropriate exceptions such as ArgumentNullException or InvalidOperationException may be raised.
InnerXml is distinct from InnerText and OuterXml. InnerXml provides the markup of the children only, excluding
Use cases include programmatically injecting or replacing a subtree without constructing individual XmlNode objects manually, updating