00001 #ifndef ots_ConvertFromXML_h
00002 #define ots_ConvertFromXML_h
00003
00004 #include <string>
00005 #include <xercesc/util/XMLChar.hpp>
00006
00007 namespace ots
00008 {
00009 class ConvertFromXML
00010 {
00011 public:
00012 ConvertFromXML(const XMLCh* const toTranscode);
00013 ~ConvertFromXML();
00014
00015 const char* toConstChar(void) const;
00016 char* toChar(void) const;
00017 std::string toString(void) const;
00018
00019 private:
00020 char* xmlTranscoded_;
00021 };
00022
00023 #define XML_TO_CONST_CHAR(xml) ConvertFromXML(xml).toConstChar()
00024 #define XML_TO_CHAR(xml) ConvertFromXML(xml).toChar()
00025 #define XML_TO_STRING(xml) ConvertFromXML(xml).toString()
00026
00027 }
00028
00029 #endif