XmlContainer::putDocument API Ref

#include <DbXml.hpp>

void XmlContainer::putDocument(XmlDocument &document, XmlUpdateContext &context, u_int32_t flags = 0)

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

std::string XmlContainer::putDocument(const std::string &name, XmlEventReader &reader, XmlUpdateContext &context, u_int32_t flags = 0)

std::string XmlContainer::putDocument(XmlTransaction &txn, const std::string &name, XmlEventReader &reader, XmlUpdateContext &context, u_int32_t flags = 0)

std::string XmlContainer::putDocument(const std::string &name, XmlInputStream *adopted_input, XmlUpdateContext &context, u_int32_t flags = 0)

std::string XmlContainer::putDocument(XmlTransaction &txn, const std::string &name, XmlInputStream *adopted_input, XmlUpdateContext &context, u_int32_t flags = 0)

std::string XmlContainer::putDocument(const std::string &name, const std::string &contents, XmlUpdateContext &context, u_int32_t flags = 0)

std::string XmlContainer::putDocument(XmlTransaction &txn, const std::string &name, const std::string &contents, XmlUpdateContext &context, u_int32_t flags = 0)


Description: XmlContainer::putDocument

Inserts an XmlDocument into the container. The value returned by this method is dependent upon the form of the method that you used to perform the insertion.

Note that 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.

The document content is indexed according to the container indexing specification. The indexer supports the Xerces content encodings and expects the content to be well-formed, but it need not be valid.


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

Inserts the XmlDocument provided on the call to 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::putDocument method may fail and throw XmlException, encapsulating one of the following non-zero errors:


DATABASE_ERROR

INDEXER_PARSER_ERROR

UNIQUE_ERROR

Description: std::string XmlContainer::putDocument(XmlTransaction &txn, std::string &name, XmlEventReader &reader, XmlUpdateContext &context, u_int32_t flags = 0)

Inserts the XML document referenced by the XmlEventReader into the container. The name used for the new document is returned by this method.

Parameters
txn name reader context flags

Errors

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


DATABASE_ERROR

EVENT_ERROR

UNIQUE_ERROR

Description: std::string XmlContainer::putDocument(XmlTransaction &txn, std::string &name, XmlInputStream *adopted_input, XmlUpdateContext &context, u_int32_t flags = 0)

Inserts the XML document contained in the XmlInputStream into the container. The name used for the new document is returned by this method.

Parameters
txn name adopted_input context flags

Errors

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


DATABASE_ERROR

INDEXER_PARSER_ERROR

UNIQUE_ERROR

Description: std::string XmlContainer::putDocument(XmlTransaction &txn, std::string &name, const std::string &contents, XmlUpdateContext &context, u_int32_t flags = 0)

Inserts the XML document contained in the XmlInputStream into the container. The name used for the new document is returned by this method.

Parameters
txn name contents context flags

Errors

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


DATABASE_ERROR

INDEXER_PARSER_ERROR

UNIQUE_ERROR

APIRef

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