RXmlEngXPathResult Class Reference

class RXmlEngXPathResult

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.

Public Member Functions
RXmlEngXPathResult()
IMPORT_C TBoolAsBoolean()
IMPORT_C RXmlEngNodeSetAsNodeSet()
IMPORT_C TRealAsNumber()
IMPORT_C voidAsStringL(RBuf8 &)
voidClose()
IMPORT_C voidFree()
IMPORT_C TXmlEngXPathResultTypeType()
Private Member Functions
RXmlEngXPathResult(void *)
Public Member Enumerations
enumTXmlEngXPathResultType { EUndefined = 0, ENodeset = 1, EBoolean = 2, ENumber = 3, EString = 4 }
Private Attributes
void *iInternal

Constructor & Destructor Documentation

RXmlEngXPathResult()

IMPORT_CRXmlEngXPathResult()

Default constructor

RXmlEngXPathResult(void *)

RXmlEngXPathResult(void *aData)[private]

Constructor

Parameters

void * aDataInternal representation of XPath result

Member Functions Documentation

AsBoolean()

IMPORT_C TBoolAsBoolean()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.

Boolean value of the result

AsNodeSet()

IMPORT_C RXmlEngNodeSetAsNodeSet()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: TXmlEngNode

Node-set result

AsNumber()

IMPORT_C TRealAsNumber()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).

Numeric value of the result.

Math

AsStringL(RBuf8 &)

IMPORT_C voidAsStringL(RBuf8 &aOutput)const

Retrieves a string copy of result. leave

KErrNoMemory if out of memory situation occurs.

leave

  • Otherwise any of the system wide errors.

Parameters

RBuf8 & aOutput

Close()

voidClose()[inline]

Frees any allocated memory

Free()

IMPORT_C voidFree()

Frees any allocated memory

Type()

IMPORT_C TXmlEngXPathResultTypeType()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.

Type of result.

TXmlEngXPathResultType

Member Enumerations Documentation

Enum TXmlEngXPathResultType

Result types of a XPath expression. See http://w3.org/TR/xpath#section-Introduction

Enumerators

EUndefined = 0
ENodeset = 1
EBoolean = 2
ENumber = 3
EString = 4

Member Data Documentation

void * iInternal

void *iInternal[private]