xmltest.cpp 736 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #include "tinyxml2.h"
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. using namespace tinyxml2;
  5. int main( int argc, const char* argv )
  6. {
  7. #if 0
  8. {
  9. static const char* test = "<!--hello world-->";
  10. XMLDocument doc;
  11. doc.Parse( test );
  12. doc.Print( stdout );
  13. }
  14. {
  15. static const char* test = "<!--hello world\n"
  16. " line 2\r"
  17. " line 3\r\n"
  18. " line 4\n\r"
  19. " line 5\r-->";
  20. XMLDocument doc;
  21. doc.Parse( test );
  22. doc.Print( stdout );
  23. }
  24. #endif
  25. {
  26. static const char* test = "<element />";
  27. XMLDocument doc;
  28. doc.Parse( test );
  29. doc.Print( stdout );
  30. }
  31. return 0;
  32. }