[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


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