DocumentSet.AddDocument Method (AnyUri, IXPathNavigable)DocumentSet.AddDocument Method (AnyUri, IXPathNavigable)DocumentSet::AddDocument Method (AnyUri^, IXPathNavigable^)
Syntax
Public Function AddDocument( _ uri As AnyUri, _ navigable As System.Xml.XPath.IXPathNavigable _ ) As Boolean
public bool AddDocument( AnyUri uri, System.Xml.XPath.IXPathNavigable navigable )
public: bool AddDocument( AnyUri^ uri, System.Xml.XPath::IXPathNavigable^ navigable )
Parameters
- uri
Type: XmlPrime.AnyUriXmlPrime.AnyUriXmlPrime::AnyUri^
The document URI to associate with navigable.
- navigable
Type: System.Xml.XPath.IXPathNavigableSystem.Xml.XPath.IXPathNavigableSystem.Xml.XPath::IXPathNavigable^
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 navigable 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 navigable 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.