Saxon API for .NET

XdmNode.WriteTo Method 

Send the node (that is, the subtree rooted at this node) to an XmlTextWriter

public void WriteTo(
   XmlTextWriter writer
);

Remarks

Note that a XmlTextWriter can only handle a well-formed XML document. This method will therefore signal an exception if the node is a document node with no children, or with more than one element child.

See Also

XdmNode Class | Saxon.Api Namespace