I worte the following code:

_xml_doc = new TiXmlDocument(fname);
_xml_doc->LoadFile();

TiXmlPrinter printer;
printer.SetIndent("\t");
_xml_doc->Accept(&printer);
_xml_doc->SaveFile(fname);

And the file I saved was still indent by 4 space not a "Tab".
How to use " printer.SetIndent("\t") "

Thanks!