#include <xml/dom/xmlengxpathresult.h>
class RXmlEngXPathResult |
Public Member Enumerations | |
---|---|
enum | TXmlEngXPathResultType { EUndefined, ENodeset, EBoolean, ENumber, EString } |
Public Member Functions | |
---|---|
RXmlEngXPathResult() | |
IMPORT_C TBool | AsBoolean() |
IMPORT_C RXmlEngNodeSet | AsNodeSet() |
IMPORT_C TReal | AsNumber() |
IMPORT_C void | AsStringL(RBuf8 &) |
void | Close() |
IMPORT_C void | Free() |
IMPORT_C TXmlEngXPathResultType | Type() |
Represents the result of a XPath expression.
The result may be one of the standard types: string, boolean, number (float), node set or be undefined in the case of error.
The returned result should be freed after use.
Result types of a XPath expression. See http://w3.org/TR/xpath#section-Introduction
IMPORT_C TBool | AsBoolean | ( | ) | const |
Retrieves a boolean result. Conversion can occur from other types.
Numbers will be returned as true unless it is not a number or 0.0. A string of 0 length will return false, otherwise true. If the node exists it will be returned as true, otherwise false.
Returns: Boolean value of the result
IMPORT_C RXmlEngNodeSet | AsNodeSet | ( | ) | const |
Retrieves a node-set result. A Non-RXmlEngNodeSet result will return NULL. No conversion is done from other types.
For more information no NULL nodes:
See also: TXmlEngNode
Returns: Node-set result
IMPORT_C TReal | AsNumber | ( | ) | const |
Retrieves a numeric value result. Conversion can occur from other types.
Node sets, strings, and booleans will be cast to numbers. Anything else will return NAN (i.e. not a number).
See also: Math
Returns: Numeric value of the result.
IMPORT_C void | AsStringL | ( | RBuf8 & | aOutput | ) | const |
Otherwise any of the system wide errors.
IMPORT_C TXmlEngXPathResultType | Type | ( | ) | const |
Retrieves the type of the result (e.g. boolean, number, string, etc.). The type of a result should always be checked before using the result.
If there was an error and no value was set, undefined is returned. Otherwise nodeset is returned.
See also: TXmlEngXPathResultType
Returns: Type of result.