otsdaq  v1_01_02
 All Classes Namespaces Functions
ConvertFromXML.cc
1 #include "otsdaq-core/XmlUtilities/ConvertFromXML.h"
2 
3 #include <xercesc/util/XMLString.hpp>
4 
5 #include <cstdio>
6 
7 using namespace ots;
8 
9 //==============================================================================
10 ConvertFromXML::ConvertFromXML(const XMLCh* const toTranscode)
11 {
12  xmlTranscoded_ = xercesc::XMLString::transcode(toTranscode);
13 }
14 
15 //==============================================================================
16 ConvertFromXML::~ConvertFromXML()
17 {
18  xercesc::XMLString::release(&xmlTranscoded_);
19 }
20 
21 //==============================================================================
22 const char* ConvertFromXML::toConstChar() const
23 {
24  return xmlTranscoded_;
25 }
26 
27 //==============================================================================
28 char* ConvertFromXML::toChar() const
29 {
30  return xmlTranscoded_;
31 }
32 //==============================================================================
33 std::string ConvertFromXML::toString() const
34 {
35  return xmlTranscoded_;
36 }