Re: [xml] (Windows) xmlDocDump / xmlSavefile

Hi there.
Do not use this API unless you compile libxml together with you program.
The FILE* structure is incompatible btw. different crt versions and so you cannot guarantee that you program links to the same one as the compiled libxml2.
(Someone correct me if I'm wrong.)
You can use the xmlSaveFormatFile.. API just as well. It will even convert UTF8-Paths you pass it to UTF-16 windows paths.

best regards / mit freundlichen Grüßen,
Martin Trappel

(ps: these email disclaimers are generally not very well recieved here :-)

From: Xen Cloete [mailto:XenC hollard co za]
Sent: Thursday, May 10, 2007 4:35 PM
To: xml gnome org
Subject: [xml] (Windows) xmlDocDump / xmlSavefile



Maybe someone could assist me here.


I am having trouble saving the contents of the xml file. I have an xmlDocPtr to the area in which the data lies however when I use xmlSaveFileFormat(path, doc, 1) the file seems to either be corrupt or in some sort of binary form.


I would like to see the contents of the file i,e, xml document in readable format.


I have tried xmlDocDump as well but I get an access violation, Maybe I am not using the function correctly. This is what I have:


FILE *fp;


fp = fopen("C:\\XMLDATA\\XMLResult.xml", "w+");

xmlDocDump(fp, doc);          // as I understand the xml documentation



Any suggestions will be great.






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]