CMS 3D CMS Logo

SaxToDom2.h
Go to the documentation of this file.
1 #ifndef DETECTOR_DESCRIPTION_REGRESSION_TEST_SAXTODOM2_H
2 #define DETECTOR_DESCRIPTION_REGRESSION_TEST_SAXTODOM2_H
3 
4 #include <xercesc/util/XercesDefs.hpp>
5 #include <map>
6 #include <string>
7 #include <vector>
8 
12 #include "xercesc/sax/SAXParseException.hpp"
13 #include "xercesc/sax2/Attributes.hpp"
14 #include "xercesc/sax2/DefaultHandler.hpp"
15 #include "xercesc/util/XercesVersion.hpp"
16 
17 class AttributeList;
18 
19 class SaxToDom2 : public XERCES_CPP_NAMESPACE::DefaultHandler {
20 public:
21  using Attributes = XERCES_CPP_NAMESPACE::Attributes;
22  using SAXParseException = XERCES_CPP_NAMESPACE::SAXParseException;
23  SaxToDom2();
24  ~SaxToDom2() override;
25  void startElement(const XMLCh* uri, const XMLCh* localname, const XMLCh* qname, const Attributes& attrs) override;
26  void endElement(const XMLCh* uri, const XMLCh* name, const XMLCh* qname) override;
27  const TinyDom2& dom() const;
28 
29  // errors
30  void error(const SAXParseException& e) override;
31 
32 private:
33  std::vector<Node2> parent_;
35 };
36 
37 #endif
void error(const SAXParseException &e) override
Definition: SaxToDom2.cc:53
~SaxToDom2() override
Definition: SaxToDom2.cc:20
XERCES_CPP_NAMESPACE::SAXParseException SAXParseException
Definition: SaxToDom2.h:22
TinyDom2 dom_
Definition: SaxToDom2.h:34
std::vector< Node2 > parent_
Definition: SaxToDom2.h:33
void startElement(const XMLCh *uri, const XMLCh *localname, const XMLCh *qname, const Attributes &attrs) override
Definition: SaxToDom2.cc:24
const TinyDom2 & dom() const
Definition: SaxToDom2.cc:22
XERCES_CPP_NAMESPACE::Attributes Attributes
Definition: SaxToDom2.h:21
void endElement(const XMLCh *uri, const XMLCh *name, const XMLCh *qname) override
Definition: SaxToDom2.cc:48