1 #ifndef CALIBRATIONXML_H
2 #define CALIBRATIONXML_H
4 #include <xercesc/util/XMLString.hpp>
5 #include <xercesc/dom/DOM.hpp>
6 #include <xercesc/dom/DOMElement.hpp>
9 #include <xercesc/sax/HandlerBase.hpp>
10 #include <xercesc/parsers/XercesDOMParser.hpp>
17 typedef XERCES_CPP_NAMESPACE::DOMNode
DOMNode;
40 if(
parser) {
delete parser; XMLPlatformUtils::Terminate(); }
56 std::ostringstream buffer;
58 XMLCh * nameStr = XMLString::transcode(name.c_str());
59 XMLCh * valueStr = XMLString::transcode(buffer.str().c_str());
60 dom->setAttribute(nameStr, valueStr );
70 XMLCh* nameStr = XMLString::transcode(name.c_str());
71 char * valueStr = XMLString::transcode(dom->getAttribute(nameStr));
72 std::istringstream buffer(valueStr);
static T readAttribute(DOMElement *dom, const std::string &name)
static void writeAttribute(DOMElement *dom, const std::string &name, const T &value)
static DOMElement * addChild(DOMNode *dom, const std::string &name)
DOMElement * m_calibrationDOM
XERCES_CPP_NAMESPACE::HandlerBase HandlerBase
XERCES_CPP_NAMESPACE::XMLString XMLString
XERCES_CPP_NAMESPACE::DOMDocument DOMDocument
DOMElement * calibrationDOM()
XERCES_CPP_NAMESPACE::XMLPlatformUtils XMLPlatformUtils
XERCES_CPP_NAMESPACE::DOMNode DOMNode
void openFile(const std::string &xmlFileName)
std::string m_xmlFileName
XERCES_CPP_NAMESPACE::DOMElement DOMElement
void saveFile(const std::string &xmlFileName)
XERCES_CPP_NAMESPACE::XercesDOMParser XercesDOMParser