CMS 3D CMS Logo

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