How to convert xmlDocPtr to char * or .xml file

B

Bipin Mistry

Hello all,

I an new to XML read-write, and I am using "LibXml2" to work around
with XML data.

I am having 2 task to do (development in c++ using
libxml2-2.6.24.win32)
1. To read & parse XML data received in the form of char *
2. To create char * from the row data I have in my own created
structure that I am porting to xmlDocPtr type.


I have already done Task 1successfully and able to get all the data
from the child nodes and their attributes.
But having bit trouble with task 2 as current vision says that I can
create xmlDocPtr with the data but don't know the way to convert that
xmlDocPtr in to char *. Which I need to send it to other module of my
project.


Can any one please help me out as to how can I convert xmlDocPtr to
char *
If xmlDocPtr can be directly create XML file then this will also do as
I will read the file again in form of char * to solve my purpose.


Thanks in advance.
bipin Mistry.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,000
Messages
2,570,252
Members
46,848
Latest member
CristineKo

Latest Threads

Top