<xml></xml>

Saxon API for .NET |

# XdmNode.OuterXml Property

Return a serialization of this node as lexical XML

public string OuterXml {get;}

#### Remarks

In the case of an element node, the result will be a well-formed XML document serialized as defined in the W3C XSLT/XQuery serialization specification, using options method="xml", indent="yes", omit-xml-declaration="yes".

In the case of a document node, the result will be a well-formed XML document provided that the document node contains exactly one element child, and no text node children. In other cases it will be a well-formed external general parsed entity.

In the case of an attribute node, the output is a string in the form `name="value"`. The name will use the original namespace prefix.

Other nodes, such as text nodes, comments, and processing instructions, are represented as they would appear in lexical XML.

#### See Also

XdmNode Class | Saxon.Api Namespace