I am using JAXB and generating XML. The XML contains "<?xml version="1.0" encoding="UTF-8" standalone="yes"?>" at the first line as it should be but my question is : Is there any way to remove that line and i want only the XML part without this "<?xml version="1.0" encoding="UTF-8" standalone="yes"?>"
Could anybody please give me an idea how to get that
Running it through an XSLT identity transformation with <xsl:output omit-xml-declaration="yes"/> should work. Or there's a TRAX equivalent of that if you are working in Java.
But before you do that you should really examine why it's necessary to omit the XML declaration. Is there really a need for that?
Actually i need to send the XML by omiting the XML declaration to SOAP. thats the reason i need an XML without XML declaration. I am looking into TRAX as you said, could you please tell me if have any idea how to do that.