This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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 <xslutput 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?
Joined: Oct 04, 2004
Thanks Paul for the reply,
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.