1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // All file container data functions
22 #ifndef XMLENGFILECONTAINER_H
23 #define XMLENGFILECONTAINER_H
25 #include <xml/dom/xmlengdatacontainer.h>
30 This class represents data stored as a RFile in the DOM tree.
32 The RFile container is treated in general as a text node in the DOM tree. Data
33 is stored in the file system referenced by the RFile handle.
35 Sample code for creating a file container:
37 RXmlEngDOMImplementation domImpl;
38 domImpl.OpenL(); // opening DOM implementation object
40 // create document element
41 TXmlEngElement elem = iDoc.CreateDocumentElementL(_L8("doc"));
42 // create file container from file (file1 is an RFile object) and CID equals cid
43 TXmlEngFileContainer binData = iDoc.CreateFileContainerL(cid, file1);
44 elem.AppendChildL(binData); // append container to the dom tree
45 iDoc.Close(); // closing all opened objects
49 class TXmlEngFileContainer : public TXmlEngDataContainer
53 Gets the RFile reference
54 @return RFile reference
56 IMPORT_C RFile& File() const;
59 /** Default constructor */
60 inline TXmlEngFileContainer();
64 @param aInternal Node pointer
66 inline TXmlEngFileContainer(void* aInternal);
69 #include <xml/dom/xmlengfilecontainer.inl>
71 #endif // XMLENGFILECONTAINER_H