#include <SaxToDom2.h>
Public Types | |
typedef XERCES_CPP_NAMESPACE::Attributes | Attributes |
typedef XERCES_CPP_NAMESPACE::SAXParseException | SAXParseException |
Public Member Functions | |
const TinyDom2 & | dom () const |
void | endElement (const XMLCh *const uri, const XMLCh *const name, const XMLCh *const qname) |
void | error (const SAXParseException &e) |
SaxToDom2 () | |
void | startElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const Attributes &attrs) |
~SaxToDom2 () | |
Private Attributes | |
TinyDom2 | dom_ |
std::vector< Node2 > | parent_ |
Definition at line 17 of file SaxToDom2.h.
typedef XERCES_CPP_NAMESPACE::Attributes SaxToDom2::Attributes |
Definition at line 21 of file SaxToDom2.h.
typedef XERCES_CPP_NAMESPACE::SAXParseException SaxToDom2::SAXParseException |
Definition at line 22 of file SaxToDom2.h.
SaxToDom2::SaxToDom2 | ( | ) |
SaxToDom2::~SaxToDom2 | ( | ) |
Definition at line 21 of file SaxToDom2.cc.
{ }
const TinyDom2 & SaxToDom2::dom | ( | ) | const |
Definition at line 25 of file SaxToDom2.cc.
{ return dom_; }
void SaxToDom2::endElement | ( | const XMLCh *const | uri, |
const XMLCh *const | name, | ||
const XMLCh *const | qname | ||
) |
Definition at line 55 of file SaxToDom2.cc.
{ parent_.pop_back(); }
void SaxToDom2::error | ( | const SAXParseException & | e | ) |
Definition at line 63 of file SaxToDom2.cc.
References dtNoiseDBValidation_cfg::cerr.
void SaxToDom2::startElement | ( | const XMLCh *const | uri, |
const XMLCh *const | localname, | ||
const XMLCh *const | qname, | ||
const Attributes & | attrs | ||
) |
Definition at line 31 of file SaxToDom2.cc.
References i, StrX::localForm(), and relativeConstraints::value.
{ StrX strx(name); // element-name AttList2 al; for (unsigned int i = 0; i < atts.getLength(); ++i) { const XMLCh* aname = atts.getLocalName(i); const XMLCh* value = atts.getValue(i); al[TagName((StrX(aname).localForm()))]=TagName(StrX(value).localForm()); } // add the new element to the dom-tree Node2 nm(TagName(strx.localForm()) , al); Node2 par = parent_.back(); dom_.addEdge(par, nm, AnotherDummy2()); parent_.push_back(nm); }
TinyDom2 SaxToDom2::dom_ [private] |
Definition at line 37 of file SaxToDom2.h.
std::vector<Node2> SaxToDom2::parent_ [private] |
Definition at line 36 of file SaxToDom2.h.