RXmlEngDocument Class Reference

#include <xml/dom/xmlengdocument.h>

Link against: xmlenginedom.lib

class RXmlEngDocument : public TXmlEngNode

Inherits from

Protected Attributes
RXmlEngDOMImplementation *iImpl
Public Member Functions
RXmlEngDocument()
IMPORT_C TXmlEngNodeAdoptNodeL(TXmlEngNode)
IMPORT_C RXmlEngDocumentCloneDocumentL()
IMPORT_C voidClose()
IMPORT_C TXmlEngAttrCreateAttributeL(const TDesC8 &, const TDesC8 &)
IMPORT_C TXmlEngBinaryContainerCreateBinaryContainerL(const TDesC8 &, const TDesC8 &)
IMPORT_C TXmlEngCDATASectionCreateCDATASectionL(const TDesC8 &)
IMPORT_C TXmlEngChunkContainerCreateChunkContainerL(const TDesC8 &, const RChunk &, const TInt, const TInt)
IMPORT_C TXmlEngCommentCreateCommentL(const TDesC8 &)
IMPORT_C TXmlEngElementCreateDocumentElementL(const TDesC8 &, const TDesC8 &, const TDesC8 &)
IMPORT_C TXmlEngDocumentFragmentCreateDocumentFragmentL()
IMPORT_C TXmlEngElementCreateElementL(const TDesC8 &, const TDesC8 &, const TDesC8 &)
IMPORT_C TXmlEngEntityReferenceCreateEntityReferenceL(const TDesC8 &)
IMPORT_C TXmlEngFileContainerCreateFileContainerL(const TDesC8 &, const RFile &)
IMPORT_C TXmlEngProcessingInstructionCreateProcessingInstructionL(const TDesC8 &, const TDesC8 &)
IMPORT_C TXmlEngTextNodeCreateTextNodeL(const TDesC8 &)
IMPORT_C TXmlEngElementDocumentElement()
IMPORT_C TPtrC8DocumentUri()
IMPORT_C TXmlEngElementFindElementByXmlIdL(const TDesC8 &)
IMPORT_C TIntGetDataContainerList(RArray< TXmlEngDataContainer > &)
IMPORT_C RXmlEngDOMImplementationImplementation()
IMPORT_C TBoolIsStandalone()
IMPORT_C voidOpenL(RXmlEngDOMImplementation &)
IMPORT_C voidOpenL(RXmlEngDOMImplementation &, void *)
IMPORT_C voidOpenL(RXmlEngDOMImplementation &, TXmlEngElement)
IMPORT_C voidRegisterXmlIdL(TXmlEngElement, const TDesC8 &, const TDesC8 &)
IMPORT_C voidRegisterXmlIdL(const TDesC8 &, const TDesC8 &)
IMPORT_C TIntSaveL(const TDesC &, TXmlEngNode, const TXmlEngSerializationOptions &)
IMPORT_C TIntSaveL(RFs &, const TDesC &, TXmlEngNode, const TXmlEngSerializationOptions &)
IMPORT_C TIntSaveL(MXmlEngOutputStream &, TXmlEngNode, const TXmlEngSerializationOptions &)
IMPORT_C TIntSaveL(RBuf8 &, TXmlEngNode, const TXmlEngSerializationOptions &)
IMPORT_C voidSetDocumentElement(TXmlEngElement)
IMPORT_C voidSetDocumentUriL(const TDesC8 &)
IMPORT_C voidSetStandalone(TBool)
IMPORT_C voidSetXmlVersionL(const TDesC8 &)
IMPORT_C TPtrC8XmlEncoding()
IMPORT_C TPtrC8XmlVersion()
Protected Member Functions
RXmlEngDocument(void *)
TXmlEngNode CopyL()
voidRemove()
voidReplaceWith(TXmlEngNode)
voidReplaceWithL(TXmlEngNode)
TXmlEngNode SubstituteForL(TXmlEngNode)
Inherited Attributes
TXmlEngNode::iInternal
Inherited Enumerations
TXmlEngNode:TXmlEngDOMNodeType
Inherited Functions
TXmlEngNode::AddUserData(MXmlEngUserData *)
TXmlEngNode::AppendChildL(TXmlEngNode)
TXmlEngNode::AsAttr()const
TXmlEngNode::AsBinaryContainer()const
TXmlEngNode::AsCDATASection()const
TXmlEngNode::AsChunkContainer()const
TXmlEngNode::AsComment()const
TXmlEngNode::AsDataContainer()const
TXmlEngNode::AsDocumentFragment()const
TXmlEngNode::AsElement()const
TXmlEngNode::AsEntityReference()const
TXmlEngNode::AsFileContainer()const
TXmlEngNode::AsNamespace()const
TXmlEngNode::AsProcessingInstruction()const
TXmlEngNode::AsText()const
TXmlEngNode::BaseUriL(RBuf8 &)const
TXmlEngNode::CopyToL(TXmlEngNode)const
TXmlEngNode::DoUnlinkNode()
TXmlEngNode::FirstChild()const
TXmlEngNode::GetChildNodes(RXmlEngNodeList< TXmlEngNode > &)const
TXmlEngNode::HasAttributes()const
TXmlEngNode::HasChildNodes()const
TXmlEngNode::InnerXmlL(RBuf8 &)
TXmlEngNode::IsDefaultNamespaceL(const TDesC8 &)const
TXmlEngNode::IsNull()const
TXmlEngNode::IsSameNode(TXmlEngNode)const
TXmlEngNode::IsSimpleTextContents()const
TXmlEngNode::LastChild()const
TXmlEngNode::LinkBefore(TXmlEngNode)
TXmlEngNode::LookupNamespaceUriL(const TDesC8 &)const
TXmlEngNode::LookupPrefixL(const TDesC8 &)const
TXmlEngNode::MoveAfterSibling(TXmlEngNode)
TXmlEngNode::MoveBeforeSibling(TXmlEngNode)
TXmlEngNode::MoveTo(TXmlEngNode)
TXmlEngNode::MoveToL(TXmlEngNode)
TXmlEngNode::Name()const
TXmlEngNode::NamespaceDeclaration()const
TXmlEngNode::NamespaceUri()const
TXmlEngNode::NextSibling()const
TXmlEngNode::NodeType()const
TXmlEngNode::NotNull()const
TXmlEngNode::OuterXmlL(RBuf8 &)
TXmlEngNode::OwnerDocument()const
TXmlEngNode::ParentNode()const
TXmlEngNode::Prefix()const
TXmlEngNode::PreviousSibling()const
TXmlEngNode::ReconcileNamespacesL()
TXmlEngNode::RemoveUserData()
TXmlEngNode::SetAsFirstSibling()
TXmlEngNode::SetAsLastSibling()
TXmlEngNode::SetValueL(const TDesC8 &)
TXmlEngNode::TXmlEngNode()
TXmlEngNode::TXmlEngNode(void *)
TXmlEngNode::Unlink()
TXmlEngNode::UserData()const
TXmlEngNode::Value()const
TXmlEngNode::WholeTextContentsCopyL(RBuf8 &)const

Detailed Description

This class represents an XML document in the DOM tree. It stores all nodes and associated information about the XML document.

This class implements the interface. Another class, RXmlEngDOMImplementation, provides the implementation. An instance of RXmlEngDOMImplementation must be constructed and opened first and passed to RXmlEngDocument::OpenL().

Member Attribute Documentation

iImpl

RXmlEngDOMImplementation *iImpl[protected]

Pointer to DOM implementation object

Constructor & Destructor Documentation

RXmlEngDocument ( )

IMPORT_CRXmlEngDocument()

Default constructor. An instance of RXmlEngDocument must be "opened" with one of OpenL() overloads before methods are invoked on the object.

RXmlEngDocument ( void * )

RXmlEngDocument(void *aInternal)[protected, inline]

Constructor

Parameters
aInternalDocument pointer

Member Function Documentation

AdoptNodeL ( TXmlEngNode )

IMPORT_C TXmlEngNodeAdoptNodeL(TXmlEngNodeaSource)
Sets the "document" property on the node and all its descendants to be this RXmlEngDocument node
Parameters
aSourceNode that should be added.
Return Value
Adopted node
Leave Codes
KXmlEngErrWrongUseOfAPIThe node has a parent node, the node is already owned by this document, or the node is a document.

CloneDocumentL ( )

IMPORT_C RXmlEngDocumentCloneDocumentL()const

Creates a complete copy of the document and transfers ownership to the caller. The caller is required to call Close() on the new document. The new document is independant from this document and this document may be changed or closed without affecting the new document.

Return Value
Complete copy of the document
Leave Codes

Close ( )

IMPORT_C voidClose()

Closes document: All owned nodes, child nodes, and namespaces are freed. All data containers on the data container list are freed.

CopyL ( )

TXmlEngNode CopyL()const [protected, inline]

Reimplemented from TXmlEngNode::CopyL()const

DISABLED for document; CloneDocumentL() must be used

CreateAttributeL ( const TDesC8 &, const TDesC8 & )

IMPORT_C TXmlEngAttrCreateAttributeL(const TDesC8 &aName,
const TDesC8 &aValue = KNullDesC8
)

Creates a new attribute.

aValue should represent the correct value of an attribute if it is put as-is into an XML file (with all characters correctly escaped with entity references when XML spec requires)

The TXmlEngElement class provides a rich set of attribute creation methods, which not only create attributes but also link them into elements.

See also: TXmlEngElement

There is no way to create attributes with namespaces (despite the DOM spec); you have to use one of the TXmlEngElement::AddNewAttributeL(..) methods instead

The returned attribute is the only reference to the allocated memory until you have attached the attribute to some element node.

Parameters
aNameName of the atribute; no prefix allowed
aValueValue of the attribute (optional)
Return Value
The newly created attribute
Leave Codes
KXmlEngErrWrongUseOfAPINo name specified

CreateBinaryContainerL ( const TDesC8 &, const TDesC8 & )

IMPORT_C TXmlEngBinaryContainerCreateBinaryContainerL(const TDesC8 &aCid,
const TDesC8 &aData
)

Creates a new binary container and copies the specified cid and data into it. A pointer to the container is stored in the document's data container list that can be fetched using GetDataContainerList().

See also: GetDataContainerList( RArray<TXmlEngDataContainer>& aList )

Parameters
aCidContent identifier
aDataBinary octets
Return Value
The new binary container
Leave Codes

CreateCDATASectionL ( const TDesC8 & )

IMPORT_C TXmlEngCDATASectionCreateCDATASectionL(const TDesC8 &aContents = KNullDesC8)
Creates a new CDATA section node and copies the specified string into it.
Parameters
aContentsCDATASection content
Return Value
The created node
Leave Codes

CreateChunkContainerL ( const TDesC8 &, const RChunk &, const TInt, const TInt )

IMPORT_C TXmlEngChunkContainerCreateChunkContainerL(const TDesC8 &aCid,
const RChunk &aChunk,
const TIntaChunkOffset,
const TIntaDataSize
)

Creates a new chunk container and copies the specified cid into it. A reference to a memory chunk is stored in the container. The memory chunk must stay in scope for the lifetime of the container. A pointer to the container is stored in the document's data container list that can be fetched using GetDataContainerList().

See also: GetDataContainerList( RArray<TXmlEngDataContainer>& aList )

Parameters
aCidContent identifier
aChunkRChunk reference
aChunkOffsetOffset to the binary data in aChunk
aDataSizeSize of binary data in aChunk
Return Value
The new chunk container
Leave Codes

CreateCommentL ( const TDesC8 & )

IMPORT_C TXmlEngCommentCreateCommentL(const TDesC8 &aText = KNullDesC8)
Creates a new comment node and copies the specified string into it.
Parameters
aTextNew comment
Return Value
The created node
Leave Codes

CreateDocumentElementL ( const TDesC8 &, const TDesC8 &, const TDesC8 & )

IMPORT_C TXmlEngElementCreateDocumentElementL(const TDesC8 &aName,
const TDesC8 &aNamespaceUri = KNullDesC8,
const TDesC8 &aPrefix = KNullDesC8
)

Creates a new element from a specific namespace to be the root of the document tree. Any existing document element of the document is destroyed.

Parameters
aNameElement name
aNamespaceUriElement namespace URI
aPrefixElement namemespace prefix
Return Value
The new root element
Leave Codes
KXmlEngErrWrongUseOfAPINo name has been specified

CreateDocumentFragmentL ( )

IMPORT_C TXmlEngDocumentFragmentCreateDocumentFragmentL()
Creates a new empty Document Fragment node. The document fragment is owned by this document.
Return Value
The created document fragment
Leave Codes

CreateElementL ( const TDesC8 &, const TDesC8 &, const TDesC8 & )

IMPORT_C TXmlEngElementCreateElementL(const TDesC8 &aLocalName,
const TDesC8 &aNamespaceUri = KNullDesC8,
const TDesC8 &aPrefix = KNullDesC8
)

Creates a new element node that belongs to the specific namespace. A namespace declaration node is created on the element.

If the provided namespace uri is NULL, the element will be created without namespace.

Parameters
aLocalNameLocal name of the element
aNamespaceUriNamespace of new element
aPrefixPrefix to use for the namespace binding and the QName of the element
Return Value
The created element
Leave Codes
KXmlEngErrWrongUseOfAPINo name specified

CreateEntityReferenceL ( const TDesC8 & )

IMPORT_C TXmlEngEntityReferenceCreateEntityReferenceL(const TDesC8 &aEntityRef)

Creates a new entity reference node and copies the specified string into it.

Note: < , > , ' , " and other predefined entity references should not be created with this method. These entity references are rather "character references" and are encoded/decoded automatically.

Parameters
aEntityRefis a string in one of these forms:name&namewhere name is the name of the entity
Return Value
The new entity reference
Leave Codes
KXmlEngErrWrongUseOfAPINo entity specified

CreateFileContainerL ( const TDesC8 &, const RFile & )

IMPORT_C TXmlEngFileContainerCreateFileContainerL(const TDesC8 &aCid,
const RFile &aFile
)

Creates a new file container and copies the specified cid into it. A reference to a file is stored in the container. aFile must stay in scope of the lifetime of the container. A pointer to the container is stored in the document's data container list that can be fetched using GetDataContainerList().

See also: GetDataContainerList( RArray<TXmlEngDataContainer>& aList )

Parameters
aCidContent identifier
aFileThe file to reference
Return Value
The new file container
Leave Codes

CreateProcessingInstructionL ( const TDesC8 &, const TDesC8 & )

IMPORT_C TXmlEngProcessingInstructionCreateProcessingInstructionL(const TDesC8 &aTarget,
const TDesC8 &aData = KNullDesC8
)

Creates a new processing instruction node and copies "target" and "data" into it.

Parameters
aTargetTarget
aDataData
Return Value
The created processing instruction
Leave Codes
KXmlEngErrWrongUseOfAPINo target specified

CreateTextNodeL ( const TDesC8 & )

IMPORT_C TXmlEngTextNodeCreateTextNodeL(const TDesC8 &aCharacters = KNullDesC8)
Creates a new text node and copies the content string into it.
Parameters
aCharactersText node content
Return Value
The created node
Leave Codes

DocumentElement ( )

IMPORT_C TXmlEngElementDocumentElement()const

Get the document element

Return Value
The document element -- the top-most element in the document tree

DocumentUri ( )

IMPORT_C TPtrC8DocumentUri()const

Retrieves base URI (if defined) of the document

Return Value
Document URI or TPtrC8("") if none.

FindElementByXmlIdL ( const TDesC8 & )

IMPORT_C TXmlEngElementFindElementByXmlIdL(const TDesC8 &aValue)const
Looks for an element with the specified xml:id attribute
Parameters
aValueName of attribute
Return Value
The found element or a NULL element if not found
Leave Codes

GetDataContainerList ( RArray< TXmlEngDataContainer > & )

IMPORT_C TIntGetDataContainerList(RArray< TXmlEngDataContainer > &aList)

Retrieves an array of data containers owned by this document.

Note: The document ceases to be the owner of a data container when the data container (or one of its predecessors) is removed from the document or becomes part of another document. Unlinking a data container (or one of its predecessors) doesn't remove ownership of the data container from this document so the list might contain containers that are not linked to this document anymore.

Parameters
aListArray of data containers
Return Value
KErrNone if successful or one of the system wide error codes otherwise

Implementation ( )

IMPORT_C RXmlEngDOMImplementationImplementation()const

Get the DOM implementation. Ownership is not transferred. Any operation on the returned object will affect this document directly, in particular, a call to RXmlEngDOMImplementation::Close() will cause further operations on this document to fail.

Return Value
Object that represents current DOM implementation

IsStandalone ( )

IMPORT_C TBoolIsStandalone()const

Check if document is standalone

Return Value
ETrue if standalone="true" was specified in the XML declaration in the source XML file.

OpenL ( RXmlEngDOMImplementation & )

IMPORT_C voidOpenL(RXmlEngDOMImplementation &aDOMImpl)
Opens the document.
Parameters
aDOMImplAn opened DOM implementation object
Leave Codes

OpenL ( RXmlEngDOMImplementation &, void * )

IMPORT_C voidOpenL(RXmlEngDOMImplementation &aDOMImpl,
void *aInternal
)

Opens the document, initializing it with the internal state pointer from another RXmlEngDocument. This document becomes an alias for the document whose state is represented by aInternal and a change in either document will be reflected in the other. Close() need only be called once, however, it is not an error to call Close() on each RXmlEngDocument.

Parameters
aDOMImplAn opened DOM implementation object
aInternalThe internal document state to initialize this object with
Leave Codes

OpenL ( RXmlEngDOMImplementation &, TXmlEngElement )

IMPORT_C voidOpenL(RXmlEngDOMImplementation &aDOMImpl,
TXmlEngElementaRoot
)

Opens the document and adds aRoot as the root of the DOM tree. If aRoot is currently part of another document, it will be unlinked. Ownership is transferred to this document.

Parameters
aDOMImplAn opened DOM implementation object
aRootThe element that will be the root of the DOM tree
Leave Codes

RegisterXmlIdL ( TXmlEngElement, const TDesC8 &, const TDesC8 & )

IMPORT_C voidRegisterXmlIdL(TXmlEngElementaStartElement,
const TDesC8 &aLocalName,
const TDesC8 &aNamespaceUri = KNullDesC8
)

Sets the specified attribute as a xml:id attribute, starting at aStartElement and recursing through the subtree. To set the specified attribute as a xml:id attribute for the entire DOM tree, see RegisterXmlId(const TDesC8&,const TDesC8&).

Parameters
aStartElementRoot of the subtree to recurse
aLocalNameName of the attribute
aNamespaceUriNamespace of the new element (default empty)
Leave Codes
KXmlEngErrWrongUseOfAPIThe starting element is NULL, the attribute name is not specified, the starting element is the document, or the starting element does not belong to a document.
KErrAlreadyExistsThe attribute is already set to be xml:id

RegisterXmlIdL ( const TDesC8 &, const TDesC8 & )

IMPORT_C voidRegisterXmlIdL(const TDesC8 &aLocalName,
const TDesC8 &aNamespaceUri = KNullDesC8
)

Sets the specified attribute as a xml:id attribute, recursing through the entire DOM tree. In order to specify a subtree only, see RegisterXmlId(TXmlEngElement,const TDesC8,const TDesC8).

Parameters
aLocalNameName of attribute
aNamespaceUriNamespace of new element (default empty)
Leave Codes
KXmlEngErrWrongUseOfAPIThe document is NULL
KErrAlreadyExistsThe attribute is already set to be xml:id

Remove ( )

voidRemove()[protected, inline]

Reimplemented from TXmlEngNode::Remove()

DISABLED for document; Close() must be used

ReplaceWith ( TXmlEngNode )

voidReplaceWith(TXmlEngNodeaNode)[protected, inline]

Reimplemented from TXmlEngNode::ReplaceWith(TXmlEngNode)

DISABLED for document; Close() must be used

ReplaceWithL ( TXmlEngNode )

voidReplaceWithL(TXmlEngNodeaNode)[protected, inline]

This node is replaced with another node (or subtree). The replacement node is linked into the document tree instead of this node. The replaced node is destroyed. Replacement of a node with a NULL TXmlEngNode is legal and equivalent to removing the node.

aNode is unlinked from its previous location, which can be none (i.e. not linked), within the same document tree, or within another document tree.

Note: Not applicable to document nodes.

See also: SubstituteForL(TXmlEngNode)

Parameters
aNodeNode that replaces this node
Leave Codes
KXmlEngErrNullNodeNode is NULL
KXmlEngErrWrongUseOfAPINode is a document node

SaveL ( const TDesC &, TXmlEngNode, const TXmlEngSerializationOptions & )

IMPORT_C TIntSaveL(const TDesC &aFileName,
TXmlEngNodeaRoot =  TXmlEngNode(),
const TXmlEngSerializationOptions &aSaveOptions =  TXmlEngSerializationOptions()
)const

Serializes document tree into a file. For nodes containing binary data in the form of BinaryDataContainer, FileContainer or ChunkContainer, the client can implement custom serialization by implementing the MXmlEngDataSerializer interface and saving a pointer to the customer serializer in the iDataSerializer member of the aSaveOptions parameter. If no custom serialization is specified, the binary data container nodes are serialized like text nodes.

If no aRoot is provided, the entire DOM tree is serialized. aRoot does not need to be owned by this document.

Parameters
aFileNameA file name (with path)
aRootRoot node to be serialized
aSaveOptionsOptions that control how serialization is performed
Return Value
Number of bytes written
Leave Codes
KXmlEngErrWrongEncodingEncoding not understood
KXmlEngErrWrongUseOfAPIDocument is NULL
KXmlEngErrNegativeOutputSizeThe data to be serialized has a negative size

SaveL ( RFs &, const TDesC &, TXmlEngNode, const TXmlEngSerializationOptions & )

IMPORT_C TIntSaveL(RFs &aRFs,
const TDesC &aFileName,
TXmlEngNodeaRoot =  TXmlEngNode(),
const TXmlEngSerializationOptions &aSaveOptions =  TXmlEngSerializationOptions()
)const

Serializes document tree into a file. For nodes containing binary data in the form of BinaryDataContainer, FileContainer or ChunkContainer, the client can implement custom serialization by implementing the MXmlEngDataSerializer interface and saving a pointer to the customer serializer in the iDataSerializer member of the aSaveOptions parameter. If no custom serialization is specified, the binary data container nodes are serialized like text nodes.

If no aRoot is provided, the entire DOM tree is serialized. aRoot does not need to be owned by this document.

Parameters
aRFsAn open file Server session
aFileNameA file name (with path)
aRootRoot node to be serialized
aSaveOptionsOptions that control how serialization is performed
Return Value
Number of bytes written
Leave Codes
KXmlEngErrWrongEncodingEncoding not understood
KXmlEngErrWrongUseOfAPIDocument is NULL
KXmlEngErrNegativeOutputSizeThe data to be serialized has a negative size

SaveL ( MXmlEngOutputStream &, TXmlEngNode, const TXmlEngSerializationOptions & )

IMPORT_C TIntSaveL(MXmlEngOutputStream &aStream,
TXmlEngNodeaRoot =  TXmlEngNode(),
const TXmlEngSerializationOptions &aSaveOptions =  TXmlEngSerializationOptions()
)const

Serializes document tree into provided output stream, which supports progressive writing of data. For nodes containing binary data in the form of BinaryDataContainer, FileContainer or ChunkContainer, the client can implement custom serialization by implementing the MXmlEngDataSerializer interface and saving a pointer to the customer serializer in the iDataSerializer member of the aSaveOptions parameter. If no custom serialization is specified, the binary data container nodes are serialized like text nodes.

If no aRoot is provided, the entire DOM tree is serialized. aRoot does not need to be owned by this document.

Parameters
aStreamAn output stream to write the serialized DOM tree
aRootRoot node to be serialized
aSaveOptionsOptions that control how serialization is performed
Return Value
Number of bytes written
Leave Codes
KXmlEngErrWrongEncodingEncoding not understood
KXmlEngErrWrongUseOfAPIDocument is NULL
KXmlEngErrNegativeOutputSizeThe data to be serialized has a negative size

SaveL ( RBuf8 &, TXmlEngNode, const TXmlEngSerializationOptions & )

IMPORT_C TIntSaveL(RBuf8 &aBuffer,
TXmlEngNodeaRoot =  TXmlEngNode(),
const TXmlEngSerializationOptions &aSaveOptions =  TXmlEngSerializationOptions()
)const

Saves document tree into memory buffer.

Any existing contents in aBuffer will be deleted. The memory required for aBuffer will be allocated by this method. The method caller must Close() aBuffer.

If no aRoot is provided, the entire DOM tree is serialized. aRoot does not need to be owned by this document.

Parameters
aBufferResulting buffer
aRootThe root of the subtree to serialize
aSaveOptionsOptions that control how serialization is performed
Return Value
Size of buffer
Leave Codes
KXmlEngErrWrongEncodingEncoding not understood
KXmlEngErrWrongUseOfAPIDocument is NULL
KXmlEngErrNegativeOutputSizeThe data to be serialized has a negative size

SetDocumentElement ( TXmlEngElement )

IMPORT_C voidSetDocumentElement(TXmlEngElementaNewDocElement)

Replaces (and destroys) the document element.

Note: Use TXmlEngElement::ReconcileNamespacesL() on the new document element if it or its descendants can contain references to namespace declarations outside of the element.

See also: TXmlEngElement::ReconcileNamespacesL()

Parameters
aNewDocElementNew document element

SetDocumentUriL ( const TDesC8 & )

IMPORT_C voidSetDocumentUriL(const TDesC8 &aUri)
Sets the location of the document. The document's URI is used as the top-level base URI definition.
Parameters
aUriDocument URI
Leave Codes

SetStandalone ( TBool )

IMPORT_C voidSetStandalone(TBoolaStandalone)

Sets "standalone" attribute of XML declaration for the document

Parameters
aStandaloneIs the document standalone

SetXmlVersionL ( const TDesC8 & )

IMPORT_C voidSetXmlVersionL(const TDesC8 &aVersion)
Sets XML version number to be shown in XML declaration when document is serialized.
Parameters
aVersionVersion string
Leave Codes

SubstituteForL ( TXmlEngNode )

TXmlEngNode SubstituteForL(TXmlEngNodeaNode)[protected, inline]

DISABLED for document; Close() must be used

XmlEncoding ( )

IMPORT_C TPtrC8XmlEncoding()const

Get document encoding.

Return Value
Encoding of the source XML data or TPtrC8("") if none.

XmlVersion ( )

IMPORT_C TPtrC8XmlVersion()const

Get xml version

Return Value
Version number reported by the XML declaration or TPtrC8("") if none.