MarkLogic XCC/.Net Library

ContentFactory.NewContent Method (String, XdmNode, ContentCreateOptions)

Create a new Content object from an XdmNode. This object may have been constructed locally or received as a member of a ResultSequence. If not explicitly overridden, the document format will be set to XML.

[Visual Basic]
Overloads Public Shared Function NewContent( _
   ByVal uri As String, _
   ByVal documentNode As XdmNode, _
   ByVal createOptions As ContentCreateOptions _
) As Content
[C#]
public static Content NewContent(
   string uri,
   XdmNode documentNode,
   ContentCreateOptions createOptions
);

Parameters

uri
The URI (name) with which the document will be inserted into the content store. If the URI already exists in the store, it will be replaced with the new content.
documentNode
An instance of XdmNode which is the document content. Only nodes of type XdmElement, XdmText or XdmBinary are valid.
createOptions
Creation meta-information to be applied when the content is inserted into the contentbase. These options control the document format (xml, text, binary) and access permissions.

Return Value

A Content object suitable for passing to Session.insertContent(Content)

See Also

ContentFactory Class | Marklogic.Xcc Namespace | ContentFactory.NewContent Overload List