Reputation: 1784
I have a XML document which is received as a character stream. I wish to parse this using libxml2. Well one way would be to save it as an .xml and then open it using one of the libxml2 API's. Is there a way i can directly build a tree on this stream and parse it ?
Env is purely c++/c.
Cheers!
Upvotes: 1
Views: 855
Reputation: 50971
You can use xlmCtxtReadFd from parser.h. There's also xmlCtxtReadMemory, if you would rather use a block of memory than a stream.
Upvotes: 2