00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 inline
00024 std::string StrX(const XMLCh * const s) {
00025 char *buf = xercesc::XMLString::transcode(s);
00026 const std::string str(buf);
00027
00028 xercesc::XMLString::release(&buf);
00029
00030 return str;
00031 }
00032
00033 inline
00034 XStrHelper::XStrHelper(const std::string &s) :
00035 m_unicode_form(xercesc::XMLString::transcode(s.c_str()))
00036 {
00037 }
00038
00039 inline
00040 XStrHelper::~XStrHelper() {
00041 xercesc::XMLString::release(&m_unicode_form);
00042 }
00043
00044 inline
00045 const XMLCh *XStrHelper::GetUnicodeForm() const {
00046 return m_unicode_form;
00047 }
00048
00049 inline
00050 std::ostream &operator<<(std::ostream &target, const XMLCh * const s) {
00051 return target << StrX(s);
00052 }