1
0

XMLString.cpp 879 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. #include <strsafe.h>
  11. XMLString::XMLString()
  12. {
  13. data[0]=0;
  14. }
  15. void XMLString::Reset()
  16. {
  17. data[0]=0;
  18. }
  19. const wchar_t *XMLString::GetString()
  20. {
  21. return data;
  22. }
  23. void XMLString::StartTag(const wchar_t *xmlpath, const wchar_t *xmltag, ifc_xmlreaderparams *params)
  24. {
  25. data[0]=0;
  26. }
  27. void XMLString::TextHandler(const wchar_t *xmlpath, const wchar_t *xmltag, const wchar_t *str)
  28. {
  29. StringCchCatW(data, XMLSTRING_SIZE, str);
  30. }
  31. void XMLString::ManualSet(const wchar_t *string)
  32. {
  33. StringCchCatW(data, XMLSTRING_SIZE, string);
  34. }
  35. #ifdef CBCLASS
  36. #undef CBCLASS
  37. #endif
  38. #define CBCLASS XMLString
  39. START_DISPATCH;
  40. VCB(ONSTARTELEMENT, StartTag)
  41. VCB(ONCHARDATA, TextHandler)
  42. END_DISPATCH;