tags:

views:

37

answers:

1

Hello All,

Is it possible to use TinyXML over a byte stream instead of a file?

Consider this code snippet:

TiXmlDocument doc("abc.xml");
if (!doc.LoadFile())
 return;
TiXmlHandle hDoc(&doc);

The above code snippet takes a file as input. How can I modify the code so that it accepts a byte stream? A sample code snippet would be great!

+2  A: 

Directly call TinyXmlDocument::Parse with the NULL terminated byte stream as the first argument. (See the implementation of TinyXmlDocument::LoadFile on how to call this function).

Vijay Mathew