00001
00002
00003
00004
00008 #ifndef XMLI_CHSTR_H
00009 #define XMLI_CHSTR_H
00010 #include <string>
00011 #include <vector>
00012 #include <xercesc/util/XMLString.hpp>
00013 using namespace xercesc;
00014
00015 namespace xmli {
00017 class ChString : public std::string {
00018 public:
00019 ChString(const XMLCh* ch) {
00020 char* c = XMLString::transcode(ch);
00021 (*static_cast<std::string*>(this)) = c;
00022 XMLString::release(&c);
00023 }
00024
00025 static int Split(const char* text, const char* delim,
00026 std::vector<std::string>& fields);
00027 static bool IsTrue(const std::string& s);
00028 static bool IsFalse(const std::string& s);
00029 static void Trim(std::string& s);
00030 };
00031 }
00032 #endif
00033