CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/DetectorDescription/RegressionTest/src/SaxToDom2.h

Go to the documentation of this file.
00001 #ifndef x_SaxToDom2_h
00002 #define x_SaxToDom2_h
00003 
00004 #include <xercesc/util/XercesDefs.hpp>
00005 #include "xercesc/sax2/DefaultHandler.hpp"
00006 #include "DetectorDescription/Core/interface/adjgraph.h"
00007 #include "DetectorDescription/Core/interface/graphwalker.h"
00008 
00009 #include "DetectorDescription/RegressionTest/src/TinyDom2.h"
00010 
00011 #include <string>
00012 #include <map>
00013 #include <vector>
00014 
00015 class AttributeList;
00016 
00017 class SaxToDom2 : public XERCES_CPP_NAMESPACE::DefaultHandler
00018 {
00019 
00020 public:
00021   typedef XERCES_CPP_NAMESPACE::Attributes Attributes;
00022   typedef XERCES_CPP_NAMESPACE::SAXParseException SAXParseException;
00023   SaxToDom2();
00024   ~SaxToDom2();
00025   void startElement(const XMLCh* const uri, const XMLCh* const localname, const XMLCh* const qname, const Attributes& attrs);
00026   //void startElement(const XMLCh* const name, AttributeList& attributes);
00027   void endElement(const XMLCh* const uri, 
00028                             const XMLCh* const name, 
00029                                const XMLCh* const qname);
00030   const TinyDom2 & dom() const;
00031 
00032   // errors
00033   void error(const SAXParseException& e);
00034   
00035 private:
00036   std::vector<Node2> parent_;
00037   TinyDom2 dom_; 
00038 };
00039 
00040 #endif