Saxon API for .NET

DocumentBuilder.Wrap Method 

Wrap an XML DOM document, supplied as an XmlNode, as a Saxon XdmNode.

public XdmNode Wrap(
   XmlDocument doc
);

Parameters

doc
The DOM document node to be wrapped

Return Value

An XdmNode, the Saxon document node at the root of the tree of the resulting in-memory document

Remarks

This method must be applied at the level of the Document Node. Unlike the Build method, the original DOM is not copied. This saves memory and time, but it also means that it is not possible to perform operations such as whitespace stripping and schema validation.

See Also

DocumentBuilder Class | Saxon.Api Namespace