OuterXml
OuterXml is a property found in many XML DOM implementations, most notably in the .NET Framework’s System.Xml.XmlNode class. It returns a string containing the XML markup that represents the node and all of its descendant nodes. This is in contrast to InnerXml, which returns only the markup for the node’s children and not the node itself. OuterXml is a read-only property, meaning it cannot be assigned to directly; to replace a node’s markup you typically create a new node or fragment from a string and modify the tree with DOM methods such as ReplaceChild or by loading the string into a document.
In practice, OuterXml yields different results depending on the node type. For an element node, OuterXml includes
Common uses of OuterXml include obtaining a complete serialized representation of a node subtree for logging,
In summary, OuterXml provides the complete XML markup for a node and its descendants as a string,