DocumentSet.AddDocument Method (AnyUri, ResolvedDocument)DocumentSet.AddDocument Method (AnyUri, ResolvedDocument)DocumentSet::AddDocument Method (AnyUri^, ResolvedDocument^)
Syntax
Public Function AddDocument( _ uri As AnyUri, _ document As ResolvedDocument _ ) As Boolean
public bool AddDocument( AnyUri uri, ResolvedDocument document )
public: bool AddDocument( AnyUri^ uri, ResolvedDocument^ document )
Parameters
- uri
Type: XmlPrime.AnyUriXmlPrime.AnyUriXmlPrime::AnyUri^
The document URI to associate with document.
- document
Type: XmlPrime.ResolvedDocumentXmlPrime.ResolvedDocumentXmlPrime::ResolvedDocument^
The document to add to the DocumentSetDocumentSetDocumentSet, or
null
a null reference (Nothing
in Visual Basic)nullptr
if the document is unavailable.
Return Value
Type: System.BooleanSystem.BooleanSystem::Boolean
true
True
true
if the document was added to the DocumentSetDocumentSetDocumentSet;
false
False
false
otherwise.
Exceptions
Exception | Condition |
ArgumentNullExceptionArgumentNullExceptionArgumentNullException |
uri is null
a null reference (Nothing in Visual Basic)
nullptr .
|
ArgumentExceptionArgumentExceptionArgumentException |
|
Remarks
The document URI of the document contained in document must either be empty or equivalent to uri.
If uri is already in the document set then no change is made and this method returns
false
False
false
.
If document is null
a null reference (Nothing
in Visual Basic)
nullptr
then during evaluation of an XQuery program, XSL
transformation or XPath expression, fn:doc-available
will return false
for
uri, and the fn:doc
function will raise an FODC0002
error.