XmlResults::next

API Ref

#include <DbXml.hpp>

bool XmlResults::next(XmlValue &value); bool XmlResults::next(XmlDocument &document); bool XmlResults::next(XmlDocument &document, XmlValue &value);


Description: XmlResults::next

The XmlResults::next method retrieves the next value in the result set. When no more values remain in the result set, the XmlResults::next method returns false.

Three implementations of the XmlResults::next method are provided. Their usage depends upon the settings of the XmlQueryContext passed through the XmlContainer::queryWithXPath method. If the context return type was set to ResultValues then next(value) should be used. If the return type was set to ResultDocuments then next(document) can be used as a convenience. If ResultDocumentsAndValues was set then next(document,value) should be used.

If a query was processed with eager evaluation, a call to the XmlResults::reset method resets the result set iterator, so that a subsequent call to XmlResults::next returns the first value in the result set.

The XmlResults::next method retrieves the next value in the result set. When no more values remain in the result set, the XmlResults::next method returns false.

Errors

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

CONTAINER_CLOSED
A lazily evaluated XmlResults found that the underlying container was closed.

DATABASE_ERROR
An error occurred in an underlying Berkeley DB database. The XmlException::getDbError method will return the error code for the error.

DOM_PARSER_ERROR
The document could not be returned as a DOM.

Description: XmlResults.next(XmlDocument)

Parameters

document
The XmlDocument into which the next document in the result set is to be placed.

Returns the next document in the result set.

Errors

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

CONTAINER_CLOSED
A lazily evaluated XmlResults found that the underlying container was closed.

DATABASE_ERROR
An error occurred in an underlying Berkeley DB database. The XmlException::getDbError method will return the error code for the error.

DOM_PARSER_ERROR
The document could not be returned as a DOM.

Description: XmlResults.next(XmlDocument,XmlValue)

Parameters

value
The XmlValue into which the next value in the result set is to be placed.

document
The XmlDocument into which the next document in the result set is to be placed.

Returns the next document and value in the result set.

Errors

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

CONTAINER_CLOSED
A lazily evaluated XmlResults found that the underlying container was closed.

DATABASE_ERROR
An error occurred in an underlying Berkeley DB database. The XmlException::getDbError method will return the error code for the error.

DOM_PARSER_ERROR
The document could not be returned as a DOM.

Class

XmlContainer, XmlDocument, XmlException, XmlIndexSpecification, XmlQueryContext, XmlQueryExpression, XmlResults, XmlUpdateContext, XmlValue

APIRef

Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.