This class stores a reference to a RChunk handle within the DOM tree. No ownership is tranferred and the client is expected to close the RChunk when it is no longer required. Multiple chunk containers can refer to the same RChunk, regardless of whether the offsets overlap.
This class is most often instantiated by calling RXmlEngDocument::CreateChunkContainerL().
Sample code for creating chunk container:
RXmlEngDOMImplementation domImpl;
domImpl.OpenL(); // opening DOM implementation object
RXmlEngDocument iDoc;
// create document element
TXmlEngElement elem = iDoc.CreateDocumentElementL(_L8("doc"));
// create RChunk object with chunkName name and size
RChunk chunk;
chunk.CreateGlobal(chunkName, size, maxSize);
CleanupClosePushL(chunk);
// create chunk container from Rchunk object with offset to the
// binary data in chunk and binary data size in chunk (binarySize)
TXmlEngChunkContainer binData = iDoc.CreateChunkContainerL(
cid,chunk,offset,binarySize);
// append chunkcontainer to the dom tree
TXmlEngNode ref = iDoc.DocumentElement().AppendChildL(binData);
// closing all opened objects
CleanupStack::PopAndDestroy(); //chunk
iDoc.Close();
domImpl.Close();