1
0

XMLString.cpp 858 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /** (c) Nullsoft, Inc. C O N F I D E N T I A L
  2. ** Filename:
  3. ** Project:
  4. ** Description:
  5. ** Author: Ben Allison [email protected]
  6. ** Created:
  7. **/
  8. #include "main.h"
  9. #include "XMLString.h"
  10. XMLString::XMLString()
  11. {
  12. data[0]=0;
  13. }
  14. void XMLString::Reset()
  15. {
  16. data[0]=0;
  17. }
  18. const wchar_t *XMLString::GetString()
  19. {
  20. return data;
  21. }
  22. void XMLString::StartTag(const wchar_t *xmlpath, const wchar_t *xmltag, ifc_xmlreaderparams *params)
  23. {
  24. data[0]=0;
  25. }
  26. void XMLString::TextHandler(const wchar_t *xmlpath, const wchar_t *xmltag, const wchar_t *str)
  27. {
  28. StringCchCatW(data, XMLSTRING_SIZE, str);
  29. }
  30. void XMLString::ManualSet(const wchar_t *string)
  31. {
  32. StringCchCatW(data, XMLSTRING_SIZE, string);
  33. }
  34. #ifdef CBCLASS
  35. #undef CBCLASS
  36. #endif
  37. #define CBCLASS XMLString
  38. START_DISPATCH;
  39. VCB(ONSTARTELEMENT, StartTag)
  40. VCB(ONCHARDATA, TextHandler)
  41. END_DISPATCH;