API published in: S60 3rd Ed
Link against: senxml.lib
Required Capabilities
None
#include <msenfragment.h>
Inherited by CSenFragment, and CSenServiceConnection.
The subclasses are used to extract certain part of XML document into a separate XML subtree, called fragment. This M-class is typically used when a safe reference to some actual implementation is required. Fragment classes are content handlers for SAX callback events received from CSenXmlReader class. They typically inherit MSenContentHandlerClient to achive this.
Public Member Functions |
|
virtual CSenElement & | AsElement ()=0 |
Getting the fragment as an XML element. |
|
virtual CSenElement * | ExtractElement ()=0 |
Method extracts the root element (whole data) from this fragment. |
|
virtual void | SetReader (CSenXmlReader &aReader)=0 |
Sets the XML reader to be used for parsing for the fragment. |
|
virtual CSenXmlReader * | Reader ()=0 |
Gets the XML reader which this fragment uses for parsing. |
|
virtual void | ParseL (const TDesC8 &aBuf)=0 |
Method to invoke parsing of a UTF-8 form XML data. |
|
virtual TInt | BuildFrom (const TDesC8 &aBuf)=0 |
Same as ParseL() except that it doesn't leave in case of an error. |
|
virtual void | DelegateParsingL (MSenFragment &aDelegate)=0 |
Let the delegate MSenFragment handle the following SAX events. |
|
virtual void | DelegateParsingL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aQName, const RAttributeArray &aAttrs)=0 |
Creates a new delegate (fragment) using the given arguments and lets it handle the SAX events according to given localname
(or qualifiedname) and possible namespace. |
|
virtual void | ParseWithL (CSenXmlReader &aReader)=0 |
Method sets the reader for this fragment and sets this to be the content handler for the SAX events according to preset localname
(or qualifiedname) and possible namespace. |
|
virtual void | SetOwner (MSenFragment &aFragment)=0 |
Sets a new owner (parent) for this fragment. |
|
virtual void | ResumeParsingFromL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aQName)=0 |
Resumes the parsing. |
|
virtual void | SetAttributesL (const RAttributeArray &aAttrs)=0 |
Sets the attributes for the fragment. |
|
virtual void | WriteStartElementL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aQName, const RAttributeArray &aAttrs)=0 |
Writes the start element tag to the content stream. |
|
virtual void | WriteEndElementL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aQName)=0 |
Writes the end element tag to the content stream. |
|
virtual const TDesC8 & | LocalName () const =0 |
Getter for fragment XML local name. |
|
virtual const TDesC8 & | NsUri () const =0 |
Getter for fragment XML namespace URI. |
|
virtual const TDesC8 & | NsPrefix () const =0 |
Getter for XML namespace prefix of this fragment. |
|
virtual void | WriteAsXMLToL (RWriteStream &aWriteStream)=0 |
Fragment writes itself to a write stream using UTF-8 encoding. |
|
virtual HBufC * | AsXmlUnicodeL ()=0 |
Gets the fragment as Unicode (UCS-2) form XML. |
|
virtual HBufC8 * | AsXmlL ()=0 |
Gets the fragment as a UTF-8 form XML. |
|
virtual TBool | ConsistsOfL (MSenFragment &aCandidate)=0 |
Checks if fragment matches to another fragment by its content and child elements. |
|
Getting the fragment as an XML element. This method will panic if element has not been initialized (EFragmentElementNotInitialized).
Implemented in CSenBaseFragment, and CSenFragment. |
|
Gets the fragment as a UTF-8 form XML.
Implemented in CSenBaseFragment, CSenFragment, and CSenXmlServiceDescription. |
|
Gets the fragment as Unicode (UCS-2) form XML.
Implemented in CSenBaseFragment, CSenFragment, and CSenXmlServiceDescription. |
|
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.
Implemented in CSenBaseFragment, and CSenFragment. |
|
Checks if fragment matches to another fragment by its content and child elements. Fragment can contain more data than the given candidate.
Implemented in CSenBaseFragment, and CSenFragment. |
|
Creates a new delegate (fragment) using the given arguments and lets it handle the SAX events according to given localname (or qualifiedname) and possible namespace. This instance is made the owner of the delegate and the delegate is expected to resume parsing to this MSenFragment after it has finished handling the dedicated part of XML document in question. at the EndElementL(). The currently set XML reader is used to parse XML for the delagate, too.
Implemented in CSenBaseFragment, and CSenFragment. |
|
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. This is achieved by ResumeParsingFromL(), which delegate will call from his parent. The currently set XML reader is used to parse XML for the delagate, too.
Implemented in CSenBaseFragment, and CSenFragment. |
|
Method extracts the root element (whole data) from this fragment. After calling this method, the fragment does not have any internal element. Method is often called before fragment is destroyed, in order to fetch its content and transfer ownership to that content to some other object.
Implemented in CSenBaseFragment, and CSenFragment. |
|
Getter for fragment XML local name.
Implemented in CSenBaseFragment, and CSenFragment. |
|
Getter for XML namespace prefix of this fragment.
Implemented in CSenBaseFragment, and CSenFragment. |
|
Getter for fragment XML namespace URI.
Implemented in CSenBaseFragment, and CSenFragment. |
|
Method to invoke parsing of a UTF-8 form XML data. Note that SetReader() must be called before this method can be used. Parsing is dependent of preset localname or qualifiedname and possible namespace for this fragment.
Implemented in CSenBaseFragment, and CSenFragment. |
|
Method sets the reader for this fragment and sets this to be the content handler for the SAX events according to preset localname (or qualifiedname) and possible namespace.
Implemented in CSenBaseFragment, CSenDomFragment, and CSenFragment. |
|
Gets the XML reader which this fragment uses for parsing.
Implemented in CSenBaseFragment, and CSenFragment. |
|
Resumes the parsing. Usually called by some delegate fragment which was parsing itself through DelegateParsingL() call from this instance.
Implemented in CSenBaseFragment, CSenDomFragment, CSenFragment, and CSenXmlServiceDescription. |
|
Sets the attributes for the fragment.
Implemented in CSenBaseFragment, CSenDomFragment, CSenFragment, and CSenXmlServiceDescription. |
|
Sets a new owner (parent) for this fragment.
Implemented in CSenBaseFragment, and CSenFragment. |
|
Sets the XML reader to be used for parsing for the fragment.
Implemented in CSenBaseFragment, and CSenFragment. |
|
Fragment writes itself to a write stream using UTF-8 encoding.
Implemented in CSenBaseFragment, CSenFragment, and CSenXmlServiceDescription. |
|
Writes the end element tag to the content stream. Subclasses typically override this
Implemented in CSenBaseFragment, CSenDomFragment, and CSenFragment. |
|
Writes the start element tag to the content stream. Subclasses typically override this.
Implemented in CSenBaseFragment, CSenDomFragment, and CSenFragment. |