cancel
Showing results for 
Search instead for 
Did you mean: 

how to remove <?xml version="1.0" encoding="UTF-8"?>.

Former Member
0 Kudos

HI Experts,

i am doing one scenario file to file . in soruce payload i have <?xml version="1.0" encoding="UTF-8"?> . i want to remove <?xml version="1.0" encoding="UTF-8"?> at target side. is it possible .

regards,

alekhya.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi.

You can use JavaMapping for this.

in you method to transform you can add this line


   ....
   idTransform.setOutputProperty (OutputKeys.OMIT_XML_DECLARATION,"yes");  
 .....

Former Member
0 Kudos

<REMOVED BY MODERATOR> <NO NEW INFORMATION, JUST COPY PASTE OF PREVIOUS REPLIES>

Edited by: Prateek Raj Srivastava on Dec 5, 2011 10:17 PM

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

i want to remove <?xml version="1.0" encoding="UTF-8"?> at target side. is it possible .

You can use XSLT and add


<xsl:output method="text" version="1.0" encoding="UTF-8" omit-xml-declaration="yes"/> 

in your output declaration

Hope this helps,

Mark

Former Member
0 Kudos

Hi,

yes its possible with java mapping,

use a java mapping and replace the <?xml version="1.0" encoding="UTF-8"?> with and empty string

regards,

ganesh.