Re: [xml] (Windows) xmlDocDump / xmlSavefile

One more thing,


Apologise about the disclaimers, our company attaches them before they go out. L




From: Trappel Martin [mailto:martin trappel ksengineers at]
Sent: 10 May 2007 05:21
To: Xen Cloete
Cc: xml gnome org
Subject: 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.






"Hollard is a licensed Financial Services Provider (FSP) as defined in the Financial Advisory and Intermediary Services Act (FAIS). FAIS requires that anyone who makes any recommendation, guidance or proposal of a financial nature must be a duly authorised representative of a licensed FSP. If you are seeking financial advice, or if you feel that this email constitutes financial advice, or if the author of this email wants you to purchase, amend or cancel a policy, please check with the author that he/she is a registered representative of Hollard."

This email and all content are subject to the following disclaimer:




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