XmlQueryContext::getVariableValue

#include <DbXml.hpp>

bool XmlQueryContext::getVariableValue(
    const std::string &name, XmlValue &value);

bool XmlQueryContext::getVariableValue(
    const std::string &name, XmlResults &value);

Returns the value that is bound to a specified variable. If there is no value binding, then this method returns false and value is set to a null value (XmlValue::isNull() or XmlResults::isNull() returns true).

Parameters

name

The name of the bound variable.

value

The value bound to the named variable. If value is an XmlResults object, a sequence of values is bound to the variable.

Errors

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

INVALID_VALUE

It is not valid to use the XmlValue get method for variables with more than one value

Class

XmlQueryContext

See Also

XmlQueryContext Methods