CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/DetectorDescription/RegressionTest/src/SaxToDom.h

Go to the documentation of this file.
00001 #ifndef x_SaxToDom_h
00002 #define x_SaxToDom_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/TinyDom.h"
00010 
00011 #include <string>
00012 #include <map>
00013 #include <vector>
00014 
00015 class SaxToDom : public XERCES_CPP_NAMESPACE::DefaultHandler
00016 {
00017 public:
00018   typedef XERCES_CPP_NAMESPACE::Attributes Attributes;
00019   typedef XERCES_CPP_NAMESPACE::SAXParseException SAXParseException;
00020   SaxToDom();
00021   ~SaxToDom();
00022   void startElement(const XMLCh* const uri, const XMLCh* const localname, const XMLCh* const qname, const Attributes& attrs);
00023   //void startElement(const XMLCh* const name, AttributeList& attributes);
00024   void endElement(const XMLCh* const uri, 
00025                             const XMLCh* const name, 
00026                                const XMLCh* const qname);
00027   const TinyDom & dom() const;
00028 
00029   // errors
00030   void error(const SAXParseException& e);
00031   
00032 private:
00033   std::vector<NodeName> parent_;
00034   TinyDom dom_; 
00035 };
00036 
00037 #endif