DocumentSet Constructor (XmlResolver, XmlReaderSettings)DocumentSet Constructor (XmlResolver, XmlReaderSettings)DocumentSet Constructor (XmlResolver^, XmlReaderSettings^)
Syntax
Public Sub New ( _ resolver As System.Xml.XmlResolver, _ settings As System.Xml.XmlReaderSettings _ )
public DocumentSet( System.Xml.XmlResolver resolver, System.Xml.XmlReaderSettings settings )
public: DocumentSet( System.Xml::XmlResolver^ resolver, System.Xml::XmlReaderSettings^ settings )
Parameters
- resolver
Type: System.Xml.XmlResolverSystem.Xml.XmlResolverSystem.Xml::XmlResolver^
The resolver to use to resolve resources.
- settings
Type: System.Xml.XmlReaderSettingsSystem.Xml.XmlReaderSettingsSystem.Xml::XmlReaderSettings^
The settings to use to parse documents.
Exceptions
Exception | Condition |
ArgumentExceptionArgumentExceptionArgumentException | The NameTableNameTableNameTable of settings is null
a null reference (Nothing in Visual Basic)
nullptr . |
ArgumentNullExceptionArgumentNullExceptionArgumentNullException | settings is null
a null reference (Nothing in Visual Basic)
nullptr . |
Remarks
resolver is used to resolve all resources. Any documents are first resolved as resources, and then parsed with an XmlReaderXmlReaderXmlReader initialized using the XmlReaderSettingsXmlReaderSettingsXmlReaderSettings provided. The resolver on the XmlReader settings is replaced with one which retrieves resources directly from the document set.
If the unparsed-text
function is not used then consider constructing the DocumentSetDocumentSetDocumentSet
with an XmlReaderDocumentResolverXmlReaderDocumentResolverXmlReaderDocumentResolver and no IResourceResolverIResourceResolverIResourceResolver to avoid caching
the raw contents of every document retrieved.
This is equivalent to constructing the document set with a UnparsedTextDocumentResolverUnparsedTextDocumentResolverUnparsedTextDocumentResolver and a XmlResourceResolverXmlResourceResolverXmlResourceResolver for the document and resource resolvers respectively.
The NameTableNameTableNameTable property is set to that of the settings instance, which
must not be null
a null reference (Nothing
in Visual Basic)
nullptr
.