Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:08:22

0001 #ifndef DETECTOR_DESCRIPTION_REGRESSION_TEST_SAXTODOM_H
0002 #define DETECTOR_DESCRIPTION_REGRESSION_TEST_SAXTODOM_H
0003 
0004 #include <xercesc/util/XercesDefs.hpp>
0005 #include <map>
0006 #include <string>
0007 #include <vector>
0008 
0009 #include "DataFormats/Math/interface/Graph.h"
0010 #include "DataFormats/Math/interface/GraphWalker.h"
0011 #include "DetectorDescription/RegressionTest/src/TinyDom.h"
0012 #include "xercesc/sax/SAXParseException.hpp"
0013 #include "xercesc/sax2/Attributes.hpp"
0014 #include "xercesc/sax2/DefaultHandler.hpp"
0015 #include "xercesc/util/XercesVersion.hpp"
0016 
0017 class SaxToDom : public XERCES_CPP_NAMESPACE::DefaultHandler {
0018 public:
0019   using Attributes = XERCES_CPP_NAMESPACE::Attributes;
0020   using SAXParseException = XERCES_CPP_NAMESPACE::SAXParseException;
0021   SaxToDom();
0022   ~SaxToDom() override;
0023   void startElement(const XMLCh* uri, const XMLCh* localname, const XMLCh* qname, const Attributes& attrs) override;
0024   void endElement(const XMLCh* uri, const XMLCh* name, const XMLCh* qname) override;
0025   const TinyDom& dom() const;
0026 
0027   // errors
0028   void error(const SAXParseException& e) override;
0029 
0030 private:
0031   std::vector<NodeName> parent_;
0032   TinyDom dom_;
0033 };
0034 
0035 #endif