0

How can I prevent RapidXML from adding tabs and newlines between element tags when calling the print(...) function to output XML?

Petrus Theron
  • 27,855
  • 36
  • 153
  • 287

1 Answers1

0

Solved with the print_no_indenting flag:

char *end = print(buffer, _doc, rapidxml::print_no_indenting);
*end = 0;

or:

string s;
print(back_inserter(s), _doc, rapidxml::print_no_indenting);
Petrus Theron
  • 27,855
  • 36
  • 153
  • 287