I am using tinyxml2 interface to read xml data from stream buffer.
How can I know number of characters successfully read by tinyxml2 interface.
Probably this is what you are looking for.
According to documentation section "Printing" you can use TiXmlPrinter
class to output to a std::string
or memory buffer