cancel
Showing results for 
Search instead for 
Did you mean: 

Special character issue in XML

Former Member
0 Kudos

Hi All

I have a requirement here when an XML message is being parsed. Due to some additional enhancement for output XML I went to write a java custom code via java mapping to add new tags to existing XML. However, as XML message consists of non ascii chars, when entire xml doc read as string, java internal conversions are happening from non ascii to ascii.. this results as some new char(non- ascii) apprearing in target XML. Can any one help me how can I make sure non ascii chars will pass as it is...

Source of XML looks like

.i.e., no conversion should happen.

Thanks

Edited by: Yadagiri chinna on Apr 19, 2009 5:19 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

there is an Interface DOMConfiguration in org.w3c.dom package,that interface has a list of parameters defined in the DOM: using one of the parameter u can avoid the error ur getting.

Details of that Interface is given here

[http://java.sun.com/j2se/1.5.0/docs/api/]

Thanks and regards,

Kubra Fatima.

VijayKonam
Active Contributor
0 Kudos

Use ISO-8559-1 encoding in you file adapter.

VJ

Former Member
0 Kudos

As I mentioned you before, This problem is getting while java mapping. Moreover my scenario is not File based communication .

Thanks

Former Member
0 Kudos

Hi,

use

out.write(OutputDoc.asXML().getBytes("UTF-8"));

or

out.write(OutputDoc.asXML().getBytes("ISO-8559-1"));

Regards, mario