XdmDocument Constructor (XmlReader, XmlSpace)XdmDocument Constructor (XmlReader, XmlSpace)XdmDocument Constructor (XmlReader^, XmlSpace)

Initializes a new instance of the XdmDocumentXdmDocumentXdmDocument class from the XML data that is contained in the specified XmlReaderXmlReaderXmlReader object with the specified white space handling.

Syntax

Public Sub New ( _
    xmlReader As System.Xml.XmlReader, _
    xmlSpace As System.Xml.XmlSpace _
)
public XdmDocument(
    System.Xml.XmlReader xmlReader,
    System.Xml.XmlSpace xmlSpace
)
public:
XdmDocument(
    System.Xml::XmlReader^ xmlReader, 
    System.Xml::XmlSpace xmlSpace
)
 

Exceptions

ExceptionCondition
ArgumentNullExceptionArgumentNullExceptionArgumentNullExceptionxmlReader is null a null reference (Nothing in Visual Basic) nullptr
LicenceExceptionLicenceExceptionLicenceExceptionThis version of XmlPrime has expired.
XmlExceptionXmlExceptionXmlExceptionAn error was encountered in the XML data.

Remarks

The XmlSpaceXmlSpaceXmlSpace value passed as a parameter specifies whether to preserve white space. PreservePreservePreserve preserves all white space. DefaultDefaultDefault preserves only significant white space.

The document-uri property of the root node of the document will be taken to be the BaseURI of the XmlReaderXmlReaderXmlReader. This is because the interface does not expose the document-uri property. To set the document-uri explicitly, use an overload which takes the document URI as a parameter.