Re: [xml] Regarding creating soap message using libxml2



On Fri, Mar 15, 2013 at 04:31:24PM +0530, Venkataragavan Vijayakumar wrote:
Hi All,

I am using libxml2 to create the soap message and libcurl to send it over
HTTP.
I have seen some soap message does not have the " <?xml version="1.0"?>".

Is it possible to create XML without the XML version tag. ie without "
<?xml version="1.0"?>".

with the xmlSave APIs, yes

  http://xmlsoft.org/html/libxml-xmlsave.html

Use the XML_SAVE_NO_DECL
http://xmlsoft.org/html/libxml-xmlsave.html#xmlSaveOption

and make sure to not indicate encoding so that the output is UTF-8

Daniel

-- 
Daniel Veillard      | Open Source and Standards, Red Hat
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/


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