Logo ROOT   6.08/07
Reference Guide
TXMLDocument.h
Go to the documentation of this file.
1 // @(#)root/xmlparser:$Id$
2 // Author: Jose Lo 12/4/2005
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TXMLDocument
13 #define ROOT_TXMLDocument
14 
15 #ifndef ROOT_TObject
16 #include "TObject.h"
17 #endif
18 
19 #ifndef ROOT_TString
20 #include "TString.h"
21 #endif
22 
23 
24 struct _xmlDoc;
25 class TXMLNode;
26 
27 
28 class TXMLDocument : public TObject {
29 
30 private:
31  TXMLDocument(const TXMLDocument&); // Not implemented
32  TXMLDocument& operator=(const TXMLDocument&); // Not implemented
33 
34  _xmlDoc *fXMLDoc; // libxml xml doc
35  TXMLNode *fRootNode; // the root node
36 
37 public:
38  TXMLDocument(_xmlDoc *doc);
39  virtual ~TXMLDocument();
40 
41  TXMLNode *GetRootNode() const;
42 
43  const char *Version() const;
44  const char *Encoding() const;
45  const char *URL() const;
46 
47  ClassDef(TXMLDocument,0) // XML document created by the DOM parser
48 };
49 
50 #endif
const char * Encoding() const
Returns external initial encoding, if any or 0 in case there is no document set.
TXMLNode * fRootNode
Definition: TXMLDocument.h:35
TXMLDocument(const TXMLDocument &)
TXMLDocument & operator=(const TXMLDocument &)
virtual ~TXMLDocument()
TXMLDocument destructor.
TXMLDocument contains a pointer to an xmlDoc structure, after the parser returns a tree built during ...
Definition: TXMLDocument.h:28
#define ClassDef(name, id)
Definition: Rtypes.h:254
const char * URL() const
Returns the URI for the document or 0 in case there is no document set.
const char * Version() const
Returns the XML version string or 0 in case there is no document set.
_xmlDoc * fXMLDoc
Definition: TXMLDocument.h:34
TXMLNode * GetRootNode() const
Returns the root element node.
Mother of all ROOT objects.
Definition: TObject.h:37
TXMLNode contains a pointer to xmlNode, which is a node under the DOM tree.
Definition: TXMLNode.h:26