XMLString.cpp 703 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #include "main.h"
  2. #include "XMLString.h"
  3. #include "../nu/strsafe.h"
  4. XMLString::XMLString()
  5. {
  6. data[ 0 ] = 0;
  7. }
  8. void XMLString::Reset()
  9. {
  10. data[ 0 ] = 0;
  11. }
  12. const wchar_t *XMLString::GetString()
  13. {
  14. return data;
  15. }
  16. void XMLString::StartTag( const wchar_t *xmlpath, const wchar_t *xmltag, ifc_xmlreaderparams *params )
  17. {
  18. data[ 0 ] = 0;
  19. }
  20. void XMLString::TextHandler( const wchar_t *xmlpath, const wchar_t *xmltag, const wchar_t *str )
  21. {
  22. StringCchCatW( data, 256, str );
  23. }
  24. void XMLString::ManualSet( const wchar_t *string )
  25. {
  26. StringCchCatW( data, 256, string );
  27. }
  28. #define CBCLASS XMLString
  29. START_DISPATCH;
  30. VCB( ONSTARTELEMENT, StartTag )
  31. VCB( ONCHARDATA, TextHandler )
  32. END_DISPATCH;
  33. #undef CBCLASS