Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
调用 print(...) 函数输出 XML 时,如何防止 RapidXML 在元素标记之间添加制表符和换行符?
用print_no_indenting标志解决:
print_no_indenting
char *end = print(buffer, _doc, rapidxml::print_no_indenting); *end = 0;
或者:
string s; print(back_inserter(s), _doc, rapidxml::print_no_indenting);