Thursday, January 6, 2011

Content using session.insertContent() using XCC in MarkLogic

Code Sample to insert content using session.insertContent() using XCC in MarkLogic.
You can also specify Encoding

ContentCreateOptions createOptions = new ContentCreateOptions();
createOptions.setEncoding("UTF-8");
Content content =ContentFactory.newContent(uri, string.getBytes(), createOptions);

session.insertContent(content);

No comments: