CXmlUtils Class Reference
class CXmlUtils : public CBase
|
Misc. libxml2 related utilities.
Library:
FeedsEngine.lib
Constructor & Destructor Documentation
Member Functions Documentation
AttributeL(TXmlEngElement, const TDesC8 &)
HBufC
*
|
AttributeL
|
(
|
TXmlEngElement
|
aElement,
|
|
const
TDesC8
&
|
aAttribute
|
|
)
|
const
|
Returns the attribute's value or NULL if the attribute wasn't present.
Parameters
TXmlEngElement
aElement
|
A element.
|
const
TDesC8
& aAttribute
|
The attribute to extract.
|
CleanupMarkupL(TDes &, TInt)
Remove any markup found in the given descriptor.
Parameters
TDes
& aBuffer
|
The buffer to clean up.
|
TInt
aNewLineChar
|
The char used to insert a newline.
|
CleanupParseBuffer(TAny *)
void
|
CleanupParseBuffer
|
(
|
TAny
*
|
aPtr
|
)
|
[private, static]
|
Cleanup stack callback method to cleanup ParseBufferL.
Parameters
TAny
* aPtr
|
A libxml2 parser context ptr.
|
CleanupUrlL(TDes &)
void
|
CleanupUrlL
|
(
|
TDes
&
|
aUrl
|
)
|
const
|
Resolves any entities and escaped chars in the given url.
Parameters
TDes
& aUrl
|
The url to clean up.
|
ConstructL()
void
|
ConstructL
|
(
|
)
|
[private]
|
By default Symbian 2nd phase constructor is private.
ExtractSimpleTextL(TXmlEngElement, TInt, TBool)
HBufC
*
|
ExtractSimpleTextL
|
(
|
TXmlEngElement
|
aElement,
|
|
TInt
|
aMaxLength,
|
|
TBool
|
aFromEnd = EFalse
|
|
)
|
const
|
Performs a deep extraction of the text children of the given node. The result is returned as a 16-bit descriptor. The char encoding is always ucs2. This method is different from ExtractTextL in that it doesn't resolve entities or do any other clean up. It also has a length param.
Parameters
TXmlEngElement
aElement
|
A element.
|
TInt
aMaxLength
|
The max length to extract or 0 to extract the entire string.
|
TBool
aFromEnd = EFalse
|
If ETrue the aMaxLength chars are taken from the end of the string.
|
ExtractTextL(TXmlEngElement)
HBufC
*
|
ExtractTextL
|
(
|
TXmlEngElement
|
aElement
|
)
|
const
|
Performs a deep extraction of the text children of the given node. The result is returned as a 16-bit descriptor. The char encoding is always ucs2.
Parameters
TXmlEngElement
aElement
|
A element.
|
GetDocumentFirstElement(RXmlEngDocument)
TXmlEngElement
|
GetDocumentFirstElement
|
(
|
RXmlEngDocument
|
aDocument
|
)
|
const
|
Returns the first element in the given document.
Parameters
RXmlEngDocument
aDocument
|
A document.
|
GetFirstElementChild(TXmlEngElement)
TXmlEngElement
|
GetFirstElementChild
|
(
|
TXmlEngElement
|
aElement
|
)
|
const
|
Returns the first child of the given node.
Parameters
TXmlEngElement
aElement
|
A element.
|
GetFirstNamedChild(TXmlEngElement, const TDesC8 &)
TXmlEngElement
|
GetFirstNamedChild
|
(
|
TXmlEngElement
|
aElement,
|
|
const
TDesC8
&
|
aUtf8Name
|
|
)
|
const
|
Returns the first child of the given node with the provided name. aUtf8Name MUST be null terminated.
Parameters
TXmlEngElement
aElement
|
A element.
|
const
TDesC8
& aUtf8Name
|
|
GetNextSiblingElement(TXmlEngElement)
TXmlEngElement
|
GetNextSiblingElement
|
(
|
TXmlEngElement
|
aElement
|
)
|
|
Returns the next sibling of the given node.
IsNamed(TXmlEngElement, const TDesC8 &)
TBool
|
IsNamed
|
(
|
TXmlEngElement
|
aElement,
|
|
const
TDesC8
&
|
aUtf8Name
|
|
)
|
const
|
Returns true if the given node has a name of aName. This method doesn't compare the namespace.
Parameters
TXmlEngElement
aElement
|
A element.
|
const
TDesC8
& aUtf8Name
|
|
IsNamed(TXmlEngElement, const TDesC8 &, const TDesC8 &)
TBool
|
IsNamed
|
(
|
TXmlEngElement
|
aElement,
|
|
const
TDesC8
&
|
aUtf8NameSpace,
|
|
const
TDesC8
&
|
aUtf8Name
|
|
)
|
const
|
Returns true if the given node has match the given namespace and name.
Parameters
TXmlEngElement
aElement
|
A element.
|
const
TDesC8
& aUtf8NameSpace
|
|
const
TDesC8
& aUtf8Name
|
|
ParseBufferL(const TDesC8 &, const TDesC &)
RXmlEngDocument
|
ParseBufferL
|
(
|
const
TDesC8
&
|
aBuffer,
|
|
const
TDesC
&
|
aCharSet
|
|
)
|
const
|
Returns a document from the provided buffer.
Parameters
const
TDesC8
& aBuffer
|
A buffer in any char-encoding.
|
const
TDesC
& aCharSet
|
The char-set.
|
ResolveEntitiesL(TDes &)
TBool
|
ResolveEntitiesL
|
(
|
TDes
&
|
aBuffer
|
)
|
const
|
Resolves any entities found in aOrig the named entity into its char-value.
Parameters
TDes
& aBuffer
|
The buffer to clean up.
|
SkipCharsBeforeXmlProlog(const TUint8 **, TInt &)
void
|
SkipCharsBeforeXmlProlog
|
(
|
const
TUint8
**
|
aString,
|
|
TInt
&
|
aLen
|
|
)
|
const [private]
|
Skip any chars before the XML-prolog.
Parameters
const
TUint8
** aString
|
|
TInt
& aLen
|
The length of the xml buffer.
|
StripCDataMarkers(TDes &)
TBool
|
StripCDataMarkers
|
(
|
TDes
&
|
aBuffer
|
)
|
const [private]
|
Remove any CDATA markers in the given descriptor.
Parameters
TDes
& aBuffer
|
The string to be stripped of markup.
|
StripMarkupL(TDes &, TInt)
TBool
|
StripMarkupL
|
(
|
TDes
&
|
aBuffer,
|
|
TInt
|
aNewLineChar
|
|
)
|
const [private]
|
Remove any markup found in the given descriptor.
Parameters
TDes
& aBuffer
|
The string to be stripped of markup.
|
TInt
aNewLineChar
|
The char used to insert a newline.
|
Member Data Documentation
RXmlEngDOMImplementation
iImpl
RXmlEngDOMImplementation
|
iImpl
|
[private]
|
TLeakTracker
iLeakTracker
CXmlEncoding * iXmlEncoding
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.