CSenFragment Class Reference

class CSenFragment : public CBase
Abstract base class declaring XML fragment interface. SenXML.dll
Since
Series60 3.0

Inherits from

Member Functions Documentation

AsElement()

CSenElement &AsElement()[pure virtual]

Getting the fragment as an XML element. This method will panic if element has not been initialized for any reason.

AsXmlL()

HBufC8 *AsXmlL()[pure virtual]

Gets the fragment as an XML buffer.

AsXmlUnicodeL()

HBufC *AsXmlUnicodeL()[pure virtual]

Gets the fragment as an unicode XML buffer. Buffer will contain all the childs etc.

BuildFrom(const TDesC8 &)

TInt BuildFrom(const TDesC8 &aBuf)[pure virtual]

Same as ParseL() except that it doesn't leave in case of an error. Instead errors are trapped and error is returned. SetReader() must be called before this method can be used.

Parameters

const TDesC8 & aBuf

ConsistsOfL(MSenFragment &)

TBool ConsistsOfL(MSenFragment &aCandidate)[pure virtual]
Checks if fragment matches to another fragment by its content and child elements. Fragment can contain more data than the given candidate.
Since
Series60 3.0

Parameters

MSenFragment & aCandidateThe pattern to be matched. Must contain same or less data for match to come true.

Content()

TPtrC8 Content()[pure virtual]

Getter for the content. Returns content namespaces if there are any.

DelegateParsingL(MSenFragment &)

voidDelegateParsingL(MSenFragment &aDelegate)[pure virtual]

Let the delegate MSenFragment handle the following SAX events. This fragment is made the owner of the delegate and the delegate is expected to make this MSenFragment the receiver of SAX events once it has seen the end element for itself.

Parameters

MSenFragment & aDelegate

DelegateParsingL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &)

voidDelegateParsingL(const TDesC8 &aNsUri,
const TDesC8 &aLocalName,
const TDesC8 &aQName,
const RAttributeArray &aAttrs
)[pure virtual]

Creates a new fragment and lets the created MSenFragment handle the following SAX events. This fragment is made the owner of the delegate and the delegate is expected to make this MSenFragment the receiver of SAX events once it has seen the end element for itself.

Parameters

const TDesC8 & aNsUri
const TDesC8 & aLocalName
const TDesC8 & aQName
const RAttributeArray & aAttrs

ExtractElement()

CSenElement *ExtractElement()[pure virtual]

Note(!): the return value (CSenElement) STRONGLY suggests that subclasses INHERIT CSenFragment in order properly comply the requirement of the ExtractElement() implementation.

LocalName()

const TDesC8 &LocalName()const [pure virtual]

Getter for Fragment's local name.

NsPrefix()

const TDesC8 &NsPrefix()const [pure virtual]

Getter for namespace prefix of this fragment.

NsUri()

const TDesC8 &NsUri()const [pure virtual]

Getter for Fragment's namespace URI.

ParseL(const TDesC8 &)

voidParseL(const TDesC8 &aXml)[pure virtual]

Method to invoke parsing of a XML data. Note: SetReader() must be called before this method can be used.

Parameters

const TDesC8 & aXml

ParseWithL(CSenXmlReader &)

voidParseWithL(CSenXmlReader &aReader)[pure virtual]

Sets the reader for this fragment and sets this to be the content handler of the following SAX events.

Parameters

CSenXmlReader & aReader

Reader()

CSenXmlReader *Reader()[pure virtual]

Gets the XML reader which this fragment uses for parsing.

ResumeParsingFromL(const TDesC8 &, const TDesC8 &, const TDesC8 &)

voidResumeParsingFromL(const TDesC8 &aNsUri,
const TDesC8 &aLocalName,
const TDesC8 &aQName
)[pure virtual]

Resumes the parsing. Usually called by the delegate fragment which was parsing itself after DelegateParsingL().

Parameters

const TDesC8 & aNsUriThe namespace URI of the current element
const TDesC8 & aLocalNameThe local name of the current element
const TDesC8 & aQNameThe qualified name of the current element

SetAttributesL(const RAttributeArray &)

voidSetAttributesL(const RAttributeArray &aAttrs)[pure virtual]

Sets the attributes for the fragment.

Parameters

const RAttributeArray & aAttrs

SetOwner(MSenFragment &)

voidSetOwner(MSenFragment &aFragment)[pure virtual]

Sets a new parent for this fragment.

Parameters

MSenFragment & aFragment

SetReader(CSenXmlReader &)

voidSetReader(CSenXmlReader &aReader)[pure virtual]

Sets the XML reader to be used for parsing for the fragment.

Parameters

CSenXmlReader & aReader

WriteAsXMLToL(RWriteStream &)

voidWriteAsXMLToL(RWriteStream &aWriteStream)[pure virtual]

Fragment writes itself to a write stream using UTF-8 charset encoding.

Parameters

RWriteStream & aWriteStream

WriteEndElementL(const TDesC8 &, const TDesC8 &, const TDesC8 &)

voidWriteEndElementL(const TDesC8 &aNsUri,
const TDesC8 &aLocalName,
const TDesC8 &aQName
)[pure virtual]

Writes the end element tag to the content stream. Derivants can override the basic usage used in BaseFragment.

Parameters

const TDesC8 & aNsUriThe namespace URI of the current element
const TDesC8 & aLocalNameThe local name of the current element
const TDesC8 & aQNameThe qualified name of the current element

WriteStartElementL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &)

voidWriteStartElementL(const TDesC8 &aNsUri,
const TDesC8 &aLocalName,
const TDesC8 &aQName,
const RAttributeArray &aAttrs
)[pure virtual]

Writes the start element tag to the content stream. Derivants can override the basic usage used in BaseFragment.

Parameters

const TDesC8 & aNsUriThe namespace URI of the current element
const TDesC8 & aLocalNameThe local name of the current element
const TDesC8 & aQNameThe qualified name of the current element
const RAttributeArray & aAttrs