#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
Enumerator | Value | Description |
---|---|---|
EUndefined | 0 | |
ENodeset | 1 | |
EBoolean | 2 | |
ENumber | 3 | |
EString | 4 |
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.
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
IMPORT_C void | AsStringL | ( | RBuf8 & | aOutput | ) | const |
Leave Codes | |
---|---|
KErrNoMemory | if out of memory situation occurs. |
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