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 {
21 
22 public:
23  using Attributes = XERCES_CPP_NAMESPACE::Attributes;
24  using SAXParseException = XERCES_CPP_NAMESPACE::SAXParseException;
25  SaxToDom2();
26  ~SaxToDom2() override;
27  void startElement(const XMLCh* uri, const XMLCh* localname, const XMLCh* qname, const Attributes& attrs) override;
28  void endElement(const XMLCh* uri,
29  const XMLCh* name,
30  const XMLCh* qname) override;
31  const TinyDom2 & dom() const;
32 
33  // errors
34  void error(const SAXParseException& e) override;
35 
36 private:
37  std::vector<Node2> parent_;
39 };
40 
41 #endif
void error(const SAXParseException &e) override
Definition: SaxToDom2.cc:66
~SaxToDom2() override
Definition: SaxToDom2.cc:21
XERCES_CPP_NAMESPACE::SAXParseException SAXParseException
Definition: SaxToDom2.h:24
TinyDom2 dom_
Definition: SaxToDom2.h:38
std::vector< Node2 > parent_
Definition: SaxToDom2.h:37
void startElement(const XMLCh *uri, const XMLCh *localname, const XMLCh *qname, const Attributes &attrs) override
Definition: SaxToDom2.cc:31
XERCES_CPP_NAMESPACE::Attributes Attributes
Definition: SaxToDom2.h:23
const TinyDom2 & dom() const
Definition: SaxToDom2.cc:25
void endElement(const XMLCh *uri, const XMLCh *name, const XMLCh *qname) override
Definition: SaxToDom2.cc:58