-----Mensaje original-----
De: xml-bounces gnome org [mailto:xml-bounces gnome org]En nombre de Jason
Enviado el: jueves, 08 de marzo de 2007 8:52
Para: xml gnome org
Asunto: [xml] How to skip "<?xml version="1.0"?>" in the output?Dears,
How can I skip stringï<?xml version="1.0"?>ïwhen saving xml into file?
-----------
xmlDocPtr res;
int err = 0;
res = xsltApplyStylesheet(template, parameter_doc, NULL);
xsltSaveResultToFile(stdout, res, template);
if (xmlSaveFormatFile(save_file, res, 0) < 0)
{
fprintf(stderr, "I/O error in saving file: %s\n", save_file);
err = -EIO;
}
I am using xml to describing user parameters, and by the helping of a XSLT file, the user parameters will be turned into a C code. So, I didn't want <?xml version="1.0"?> appear in the file generated by xmlSaveFormatFile.
Thanks!
Jason
2007-03-08