1 #include "otsdaq/XmlUtilities/ConvertToXML.h"
4 #include <xercesc/util/XMLString.hpp>
9 ConvertToXML::ConvertToXML(
const char*
const toTranscode) : fUnicodeForm_(xercesc::XMLString::transcode(toTranscode)) {}
12 ConvertToXML::ConvertToXML(
const std::string& toTranscode) : fUnicodeForm_(xercesc::XMLString::transcode(toTranscode.c_str())) {}
15 ConvertToXML::ConvertToXML(
const int toTranscode)
18 sprintf(str,
"%d", toTranscode);
19 fUnicodeForm_ = xercesc::XMLString::transcode(str);
23 ConvertToXML::~ConvertToXML() { xercesc::XMLString::release(&fUnicodeForm_); }
26 const XMLCh* ConvertToXML::unicodeForm()
const {
return fUnicodeForm_; }