CMS 3D CMS Logo

SaxToDom.h
Go to the documentation of this file.
1 #ifndef DETECTOR_DESCRIPTION_REGRESSION_TEST_SAXTODOM_H
2 #define DETECTOR_DESCRIPTION_REGRESSION_TEST_SAXTODOM_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 SaxToDom : public XERCES_CPP_NAMESPACE::DefaultHandler
18 {
19 public:
20  using Attributes = XERCES_CPP_NAMESPACE::Attributes;
21  using SAXParseException = XERCES_CPP_NAMESPACE::SAXParseException;
22  SaxToDom();
23  ~SaxToDom() override;
24  void startElement(const XMLCh* uri, const XMLCh* localname, const XMLCh* qname, const Attributes& attrs) override;
25  void endElement(const XMLCh* uri,
26  const XMLCh* name,
27  const XMLCh* qname) override;
28  const TinyDom & dom() const;
29 
30  // errors
31  void error(const SAXParseException& e) override;
32 
33 private:
34  std::vector<NodeName> parent_;
36 };
37 
38 #endif
XERCES_CPP_NAMESPACE::SAXParseException SAXParseException
Definition: SaxToDom.h:21
void endElement(const XMLCh *uri, const XMLCh *name, const XMLCh *qname) override
Definition: SaxToDom.cc:49
XERCES_CPP_NAMESPACE::Attributes Attributes
Definition: SaxToDom.h:20
void error(const SAXParseException &e) override
Definition: SaxToDom.cc:57
SaxToDom()
Definition: SaxToDom.cc:12
TinyDom dom_
Definition: SaxToDom.h:35
~SaxToDom() override
Definition: SaxToDom.cc:15
void startElement(const XMLCh *uri, const XMLCh *localname, const XMLCh *qname, const Attributes &attrs) override
Definition: SaxToDom.cc:23
std::vector< NodeName > parent_
Definition: SaxToDom.h:34
const TinyDom & dom() const
Definition: SaxToDom.cc:18