2 Author : Harsh Arora (harsh.arora@cern.ch)
8 AliXMLParser is a tool to parse XML file and store it in trees
12 #ifndef ALIXMLPARSER_H
13 #define ALIXMLPARSER_H
19 #ifndef ROOT_TSAXParser
20 #include <TSAXParser.h>
34 AliXMLParser(const AliXMLParser& obj);
35 virtual ~AliXMLParser();
36 TList* GetTreesFromXML(TString file);
37 TList* GetTreesFromURL(TString host);
39 // -------------- Slot Functions -----------
40 void OnStartDocument();
42 void OnStartElement(const char*, const TList*);
43 void OnEndElement(const char*);
44 void OnCharacters(const char*);
45 void OnComment(const char*);
46 void OnWarning(const char*);
47 void OnError(const char*);
48 void OnFatalError(const char*);
49 void OnCdataBlock(const char*, Int_t);
50 // -----------------------------------------
54 int GetEntryIndex(TString entry_name); //Reverse search for index of entry by name
55 TList* fTreeList; //List of Trees made from tables
56 TString fTableTag; //Identifier for new table
57 Bool_t fInsideTree; //True if table_tag is identified
58 Int_t fNumTokens; //Number of Attributes
59 TList* fEntries; //List of Entries in a table
60 TList* fVal; //Corresponding values of Entries in a Table
61 Int_t fNumTrees; //Number of Trees
62 Bool_t fError; //True if error in XML is encountered
64 ClassDef(AliXMLParser,0);
66 AliXMLParser& operator=(const AliXMLParser& other);