Hi Guru's,
I am doing a FIle(XML) to Proxy scenario. Unfortunately the file sent by 3rd party system contains some special chars like "&".
Here is what I get into XI. <Program>FY08 Pilsner - National Media & Fees</Program>. When I manually change it to <Program><![CDATA[FY08 Pilsner - National Media & Fees]]></Program> it works.
After reading some of the forum threads I came to know that we can do this using JAVA mapping before doing the actual graphical mapping. I need to what exactly I should be doing in JAVA mapping and I need some sample JAVA mapping code if somebody has already implemented this solution.
Thanks.
Srini Vaidyam
Request clarification before answering.
Srinivas,
Jason's method would work, here is an alternative method of converting inputstream to string
try {
StringBuffer strbuffer = new StringBuffer();
byte[] b = new byte[4096];
for (int n;(n = in.read(b)) != -1;) {
strbuffer.append(new String(b, 0, n));
}
strXML = strbuffer.toString();
} catch (Exception e) {
System.out.println("Exception Occurred");
}
Thanks,
Anand
Edited by: Anand Gopinath on Feb 5, 2008 6:06 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.