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

ParameterDescription
aNodeNode to be converted

Returns: 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

ParameterDescription
aNodeSetNode-set to be converted

Returns: 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

ParameterDescription
aValueString that should be converted

Returns: 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

ParameterDescription
aValueTReal value to be converted

Returns: 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.
leave
  • Does not leave

ParameterDescription
aValueString that should be converted

Returns: ETrue if the string is not an empty string, EFalse otherwise

ToNumberL ( const TXmlEngNode & )

IMPORT_C TRealToNumberL(const TXmlEngNode &aNode)[static]
Converts node to number
leave
KErrNoMemory Memory allocation failure
ParameterDescription
aNodeNode to be converted

Returns: The number represented by the node or NaN if cannot convert.

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.

leave
KErrNoMemory Memory allocation failure
ParameterDescription
aNodeSetNode-set to be converted

Returns: The number represented by the node set or NaN if cannot convert.

ToNumberL ( TBool )

IMPORT_C TRealToNumberL(TBoolaValue)[static]
Converts TBool value to TReal
leave
  • Does not leave

ParameterDescription
aValueTBool value to be converted

Returns: 1.0 if ETrue and 0.0 otherwise

ToNumberL ( const TDesC8 & )

IMPORT_C TRealToNumberL(const TDesC8 &aString)[static]
Converts a string to a number
leave
KErrNoMemory Memory allocation failure
ParameterDescription
aStringString to be converted

Returns: The number respresented by the string or NaN if cannot convert.

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.

leave
KErrNoMemory Memory allocation failure
ParameterDescription
aNodeThe node to be converted
aOutputA buffer owned by the caller that holds the returned string

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.

leave
KErrNoMemory Memory allocation failure
ParameterDescription
aNodeSetThe node-set to be converted
aOutputA buffer owned by the caller that holds the returned string

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.

leave
KErrNoMemory Memory allocation failure
ParameterDescription
aValueThe TBool value to be converted
aOutputA buffer owned by the caller that holds the returned string. "true" if ETrue and "false" otherwise.

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.

leave
KErrNoMemory Memory allocation failure
ParameterDescription
aValueThe TReal value to be converted
aOutputA buffer owned by the caller that holds the returned string.