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:
Post a Comment