XmlEngXPathUtils Class Reference
#include
<xml/dom/xmlengxpathutils.h>
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 & )
Converts a node to a TBool
Parameter | Description | aNode | Node to be converted |
Returns: ETrue if the node is not NULL, EFalse otherwise
ToBoolean ( const RXmlEngNodeSet & )
Converts a node-set to a TBool
Parameter | Description | aNodeSet | Node-set to be converted |
Returns: ETrue if the nodeset is not NULL, EFalse otherwise
ToBoolean ( const TDesC8 & )
Converts a string to a TBool
Parameter | Description | aValue | String that should be converted |
Returns: ETrue if the string is not an empty string, EFalse otherwise
ToBoolean ( TReal )
Converts a TReal value to a TBool
Parameter | Description | aValue | TReal value to be converted |
Returns: EFalse if aValue is NaN or 0.0, ETrue otherwise
ToBooleanL ( const TDesC8 & )
Converts a string to a TBool
DeprecatedThis function is deprecated and will be removed in future releases.
ToBoolean() should be used instead.
- leave
-
Parameter | Description | aValue | String that should be converted |
Returns: ETrue if the string is not an empty string, EFalse otherwise
ToNumberL ( const TXmlEngNode & )
Converts node to number
- leave
- KErrNoMemory Memory allocation failure
Parameter | Description | aNode | Node to be converted |
Returns: The number represented by the node or NaN if cannot convert.
ToNumberL ( const RXmlEngNodeSet & )
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
Parameter | Description | aNodeSet | Node-set to be converted |
Returns: The number represented by the node set or NaN if cannot convert.
ToNumberL ( TBool )
Converts TBool value to TReal
- leave
-
Parameter | Description | aValue | TBool value to be converted |
Returns: 1.0 if ETrue and 0.0 otherwise
ToNumberL ( const TDesC8 & )
Converts a string to a number
- leave
- KErrNoMemory Memory allocation failure
Parameter | Description | aString | String to be converted |
Returns: The number respresented by the string or NaN if cannot convert.
ToStringL ( const TXmlEngNode &, RBuf8 & )
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
Parameter | Description | aNode | The node to be converted |
aOutput | A buffer owned by the caller that holds the returned string |
ToStringL ( const RXmlEngNodeSet &, RBuf8 & )
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
Parameter | Description | aNodeSet | The node-set to be converted |
aOutput | A buffer owned by the caller that holds the returned string |
ToStringL ( TBool, RBuf8 & )
IMPORT_C void | ToStringL | ( | TBool | aValue, |
| 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
Parameter | Description | aValue | The TBool value to be converted |
aOutput | A buffer owned by the caller that holds the returned string. "true" if ETrue and "false" otherwise. |
ToStringL ( TReal, RBuf8 & )
IMPORT_C void | ToStringL | ( | TReal | aValue, |
| 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
Parameter | Description | aValue | The TReal value to be converted |
aOutput | A buffer owned by the caller that holds the returned string. |