XmlEngXPathUtils Class Reference

#include <xml/dom/xmlengxpathutils.h>

class XmlEngXPathUtils
Public Member Functions
IMPORT_C TBoolToBoolean(const TXmlEngNode &)
IMPORT_C TBoolToBoolean(const RXmlEngNodeSet &)
IMPORT_C TBoolToBoolean(const TDesC8 &)
IMPORT_C TBoolToBoolean(TReal)
IMPORT_C TBoolToBooleanL(const TDesC8 &)
IMPORT_C TRealToNumberL(const TXmlEngNode &)
IMPORT_C TRealToNumberL(const RXmlEngNodeSet &)
IMPORT_C TRealToNumberL(TBool)
IMPORT_C TRealToNumberL(const TDesC8 &)
IMPORT_C voidToStringL(const TXmlEngNode &, RBuf8 &)
IMPORT_C voidToStringL(const RXmlEngNodeSet &, RBuf8 &)
IMPORT_C voidToStringL(TBool, RBuf8 &)
IMPORT_C voidToStringL(TReal, RBuf8 &)

Detailed Description

Implements utility functions such as conversion methods for XPath objects.

The XPath specification considers a node result as a set of only one node, however, in this API it is possible to perform conversion routines directly on nodes.

Member Function Documentation

ToBoolean ( const TXmlEngNode & )

IMPORT_C TBoolToBoolean(const TXmlEngNode &aNode)[static]

Converts a node to a TBool

Parameters
aNodeNode to be converted
Return Value
ETrue if the node is not NULL, EFalse otherwise

ToBoolean ( const RXmlEngNodeSet & )

IMPORT_C TBoolToBoolean(const RXmlEngNodeSet &aNodeSet)[static]

Converts a node-set to a TBool

Parameters
aNodeSetNode-set to be converted
Return Value
ETrue if the nodeset is not NULL, EFalse otherwise

ToBoolean ( const TDesC8 & )

IMPORT_C TBoolToBoolean(const TDesC8 &aValue)[static]

Converts a string to a TBool

Parameters
aValueString that should be converted
Return Value
ETrue if the string is not an empty string, EFalse otherwise

ToBoolean ( TReal )

IMPORT_C TBoolToBoolean(TRealaValue)[static]

Converts a TReal value to a TBool

Parameters
aValueTReal value to be converted
Return Value
EFalse if aValue is NaN or 0.0, ETrue otherwise

ToBooleanL ( const TDesC8 & )

IMPORT_C TBoolToBooleanL(const TDesC8 &aValue)[static]
Converts a string to a TBool DeprecatedThis function is deprecated and will be removed in future releases. ToBoolean() should be used instead.
Parameters
aValueString that should be converted
Return Value
ETrue if the string is not an empty string, EFalse otherwise
Leave Codes

ToNumberL ( const TXmlEngNode & )

IMPORT_C TRealToNumberL(const TXmlEngNode &aNode)[static]
Converts node to number
Parameters
aNodeNode to be converted
Return Value
The number represented by the node or NaN if cannot convert.
Leave Codes
KErrNoMemoryMemory allocation failure

ToNumberL ( const RXmlEngNodeSet & )

IMPORT_C TRealToNumberL(const RXmlEngNodeSet &aNodeSet)[static]

Converts a node-set to a number by taking the node in the node set that appears first in the document and converting that to a number.

Parameters
aNodeSetNode-set to be converted
Return Value
The number represented by the node set or NaN if cannot convert.
Leave Codes
KErrNoMemoryMemory allocation failure

ToNumberL ( TBool )

IMPORT_C TRealToNumberL(TBoolaValue)[static]
Converts TBool value to TReal
Parameters
aValueTBool value to be converted
Return Value
1.0 if ETrue and 0.0 otherwise
Leave Codes

ToNumberL ( const TDesC8 & )

IMPORT_C TRealToNumberL(const TDesC8 &aString)[static]
Converts a string to a number
Parameters
aStringString to be converted
Return Value
The number respresented by the string or NaN if cannot convert.
Leave Codes
KErrNoMemoryMemory allocation failure

ToStringL ( const TXmlEngNode &, RBuf8 & )

IMPORT_C voidToStringL(const TXmlEngNode &aNode,
RBuf8 &aOutput
)[static]

Converts a node to a string. Any existing text in aOutput is destroyed. This method allocates memory for the buffer.

Parameters
aNodeThe node to be converted
aOutputA buffer owned by the caller that holds the returned string
Leave Codes
KErrNoMemoryMemory allocation failure

ToStringL ( const RXmlEngNodeSet &, RBuf8 & )

IMPORT_C voidToStringL(const RXmlEngNodeSet &aNodeSet,
RBuf8 &aOutput
)[static]

Converts a node-set to a string by taking the node in the node set that appears first in the document and converting that to a string. Any existing text in aOutput is destroyed. This method allocates memory for the buffer.

Parameters
aNodeSetThe node-set to be converted
aOutputA buffer owned by the caller that holds the returned string
Leave Codes
KErrNoMemoryMemory allocation failure

ToStringL ( TBool, RBuf8 & )

IMPORT_C voidToStringL(TBoolaValue,
RBuf8 &aOutput
)[static]

Converts a TBool value to a string. Any existing text in aOutput is destroyed. This method allocates memory for the buffer.

Parameters
aValueThe TBool value to be converted
aOutputA buffer owned by the caller that holds the returned string. "true" if ETrue and "false" otherwise.
Leave Codes
KErrNoMemoryMemory allocation failure

ToStringL ( TReal, RBuf8 & )

IMPORT_C voidToStringL(TRealaValue,
RBuf8 &aOutput
)[static]

Converts a TReal value to a string. Any existing text in aOutput is destroyed. This method allocates memory for the buffer.

Parameters
aValueThe TReal value to be converted
aOutputA buffer owned by the caller that holds the returned string.
Leave Codes
KErrNoMemoryMemory allocation failure