Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. using namespace xercesc;
  2. using namespace std;
  3.  
  4. class XStr
  5. {
  6. public :
  7. XStr(const char* const toTranscode)
  8. {
  9. // Call the private transcoding method
  10. fUnicodeForm = XMLString::transcode(toTranscode);
  11. }
  12.  
  13. ~XStr()
  14. {
  15. XMLString::release(&fUnicodeForm);
  16. }
  17.  
  18. const XMLCh* unicodeForm() const
  19. {
  20. return fUnicodeForm;
  21. }
  22.  
  23. private :
  24. XMLCh* fUnicodeForm;
  25. };
  26.  
  27. #define X(str) XStr(str).unicodeForm()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement