XmlContainer::putDocumentAsEventWriter API Ref

#include <DbXml.hpp>

XmlEventWriter &XmlContainer::putDocumentAsEventWriter(XmlDocument &document, XmlUpdateContext &context, u_int32_t flags = 0)

XmlEventWriter &XmlContainer::putDocumentAsEventWriter(XmlTransaction &txn, XmlDocument &document, XmlUpdateContext &context, u_int32_t flags = 0)


Description: XmlContainer::putDocumentAsEventWriter

Begins insertion of an XmlDocument into the container through use of an XmlEventWriter object. Methods must be called on the returned XmlEventWriter to create content for the document, which is completed by calling XmlEventWriter::close. If XmlEventWriter::close is never called, the document insertion will not be complete, and the container may be left in an inconsistent state.

The name used for the document must be unique in the container or an exception is thrown. The flag, DBXML_GEN_NAME, can be used to generate a name. To change a document that already exists in the container, use XmlContainer::updateDocument.


Description: XmlEventWriter &XmlContainer::putDocumentAsEventWriter(XmlTransaction &txn, XmlDocument &document, XmlUpdateContext &context, u_int32_t flags = 0)

Begins insertion of an XmlDocument into the container. The name provided for the XmlDocument must be unique to the container or an exception is thrown. To set the name, use XmlDocument::setName.

Parameters
txn document context flags

Errors

The XmlContainer::putDocumentAsEventWriter method may fail and throw XmlException, encapsulating one of the following non-zero errors:


DATABASE_ERROR

UNIQUE_ERROR

APIRef

Copyright (c) 1996-2009 Oracle. All rights reserved.