Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

removing first line from JAXB generated XML

 
vamshidhar nimbagiri
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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

Thanks
Vamshi
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
vamshidhar nimbagiri
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


Thanks
Vamshi
 
vamshidhar nimbagiri
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks i got it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic