CMS 3D CMS Logo

SaxToDom2.h
Go to the documentation of this file.
1 #ifndef x_SaxToDom2_h
2 #define x_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  typedef XERCES_CPP_NAMESPACE::Attributes Attributes;
24  typedef XERCES_CPP_NAMESPACE::SAXParseException SAXParseException;
25  SaxToDom2();
26  ~SaxToDom2();
27  void startElement(const XMLCh* const uri, const XMLCh* const localname, const XMLCh* const qname, const Attributes& attrs);
28  //void startElement(const XMLCh* const name, AttributeList& attributes);
29  void endElement(const XMLCh* const uri,
30  const XMLCh* const name,
31  const XMLCh* const qname);
32  const TinyDom2 & dom() const;
33 
34  // errors
35  void error(const SAXParseException& e);
36 
37 private:
38  std::vector<Node2> parent_;
40 };
41 
42 #endif
XERCES_CPP_NAMESPACE::SAXParseException SAXParseException
Definition: SaxToDom2.h:24
void error(const SAXParseException &e)
Definition: SaxToDom2.cc:67
XERCES_CPP_NAMESPACE::Attributes Attributes
Definition: SaxToDom2.h:23
~SaxToDom2()
Definition: SaxToDom2.cc:22
void endElement(const XMLCh *const uri, const XMLCh *const name, const XMLCh *const qname)
Definition: SaxToDom2.cc:59
TinyDom2 dom_
Definition: SaxToDom2.h:39
std::vector< Node2 > parent_
Definition: SaxToDom2.h:38
void startElement(const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const Attributes &attrs)
Definition: SaxToDom2.cc:32
const TinyDom2 & dom() const
Definition: SaxToDom2.cc:26