XmlDocument::setContentAsXmlInputStream

API Ref

#include <DbXml.hpp>

void XmlDocument::setContentAsXmlInputStream(XmlInputStream *adopted_str)


Description: XmlDocument::setContentAsXmlInputStream

Sets the document's content to the provided content. If this document is a new document (that is, its name is currently not in use by another document in the container), you can add it to a container using XmlContainer::putDocument. If you are updating an already existing document, you can update the document in the container using XmlContainer::updateDocument.

Parameters

adopted_str
The input stream that points to the well-formed XML to be used as this document's content. To create the input stream, use one of XmlManager::createLocalFileInputStream, XmlManager::createMemBufInputStream, XmlManager::createStdInInputStream, XmlManager::createURLInputStream, or XmlDocument::getContentAsXmlInputStream.

Note that the document contents must be well-formed XML. However, in the event of incorrect content, an exception is not thrown until an attempt is made to place the contents into a container using either XmlContainer::putDocument or XmlContainer::updateDocument. After this call, the adopted stream is owned by the document, which will delete the object.


APIRef

Copyright (c) 1996,2007 Oracle. All rights reserved.