Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TSAXParser.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/xmlparser:$Id$
0002 // Author: Jose Lo   12/1/2005
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TSAXParser
0013 #define ROOT_TSAXParser
0014 
0015 #include "TXMLParser.h"
0016 
0017 
0018 class TList;
0019 class TSAXParserCallback;
0020 struct _xmlSAXHandler;
0021 
0022 
0023 class TSAXParser : public TXMLParser {
0024 
0025 friend class TSAXParserCallback;
0026 
0027 private:
0028    _xmlSAXHandler         *fSAXHandler;  ///< libxml2 SAX handler
0029 
0030    virtual Int_t           Parse();
0031 
0032    TSAXParser(const TSAXParser&) = delete;
0033    TSAXParser& operator=(const TSAXParser&) = delete;
0034 
0035 public:
0036    TSAXParser();
0037    ~TSAXParser() override;
0038 
0039            Int_t           ParseFile(const char *filename) override;
0040            Int_t           ParseBuffer(const char *contents, Int_t len) override;
0041 
0042    virtual void            OnStartDocument();  //*SIGNAL*
0043    virtual void            OnEndDocument();  //*SIGNAL*
0044    virtual void            OnStartElement(const char *name, const TList *attr);  //*SIGNAL*
0045    virtual void            OnEndElement(const char *name);  //*SIGNAL*
0046    virtual void            OnCharacters(const char *characters);  //*SIGNAL*
0047    virtual void            OnComment(const char *text);  //*SIGNAL*
0048    virtual void            OnWarning(const char *text);  //*SIGNAL*
0049    virtual Int_t           OnError(const char *text);  //*SIGNAL*
0050    virtual Int_t           OnFatalError(const char *text);  //*SIGNAL*
0051    virtual void            OnCdataBlock(const char *text, Int_t len);  //*SIGNAL*
0052 
0053    virtual void            ConnectToHandler(const char *handlerName, void *handler);
0054 
0055    ClassDefOverride(TSAXParser,0); // SAX Parser
0056 };
0057 
0058 #endif