1
0

XMLString.cpp 838 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 "XMLString.h"
  9. #include <strsafe.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. #define CBCLASS XMLString
  35. START_DISPATCH;
  36. VCB(ONSTARTELEMENT, StartTag)
  37. VCB(ONCHARDATA, TextHandler)
  38. END_DISPATCH;
  39. #undef CBCLASS