on 07-22-2008 9:33 AM
Hi everybody,
we have a JAVA Mapping that gerenates text nodes with special characters.
The generated XML is later used in an graphical message-mapping.
During runtime we ge the trace/error:
com.sap.aii.utilxi.misc.api.BaseRuntimeException: Fatal Error:
com.sap.engine.lib.xml.parser.ParserException: Unsupported character: 31(:main:, row:1, col:2498) at
com.sap.aii.mappingtool.tf3.Transformer.checkParserException
Does anybody know, how to modify the JAVA-mapping to have a workaound for this problem?
Thanks
Regards Mario
Edited by: Mario Müller on Jul 22, 2008 4:33 AM
Hi Mario,
As java mapping does not validate the xml,the output gets created but if u have to use the xml structure,the u will have to include the following.
Assume u r using a write method to write the output xml,then
check for tspecial charactters like &,<,>.' etc and replce them as shown below
private void write(String s)
{
//Traverse through the string
for (int i=0 ; i < string.length();i++)
{
String s1 = data.substring(i, i + 1);
if (s1.equals("&"))
{
write ("&");
}
else if (s1.equals("<"))
{
write("<");
}
else if (s1.equals(">"))
{
write(">");
}
else if (s1.equals("\""))
{
write(""");
}
else if (s1.equals("'"))
{
write("'");
}
else
{
write(s1);
}
}
}
Should help u out
Edited by: Mohd Tauseef Ibrahim on Jul 22, 2008 11:08 AM
Edited by: Mohd Tauseef Ibrahim on Jul 22, 2008 11:09 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check this blog i think it will be useful for u.
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/9420 [original link is broken] [original link is broken] [original link is broken]
Regards,
Sharanya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
maybe this document is helpful:
and also this thread:
Regards
Patrick
Edited by: Patrick Koehnen on Jul 22, 2008 10:42 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 |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.