on 05-19-2008 6:05 AM
Hi ,
Dear all,
I am working on Sender File adapter picking files from the multiple Directories which are specified in a single CC and these files are placed in the different receiver directories in different CC's metained paths of the receivers
The Souce is XML.
When I use the receiver format as .csv,.txt it the out put is as excepted,when i give the receiver format as .XML the output file contents:PK (An invalid character was found in text content. Error processing resource 'file:).
Pl let me know how to tackle thsi situation.
Thanks,
Srini
Hello Srinivasa,
Specify the character enconding at both sender and receiver side so that the file is successfully picked. The encoding must be in the xml declaration.
May this blog helps you ...,
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/9420 [original link is broken] [original link is broken] [original link is broken]
***************Reward points ,if found useful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Srini,
I think you may have to change the encoding setting for your file adapter, using the suitable value for your file ...
Like ISO-8859-x (1, 2, ...)
default encoding should be UTF-8 I think
Rgds
chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi check the blog below by poojs pandey
https://weblogs.sdn.sap.com/pub/wlg/9420 [original link is broken] [original link is broken] [original link is broken]
Note: reward points if solution found helpfull
Regards
Chandrakanth.k
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the communication channel, provide File Encoding parameter as ISO-8859-1 and also provide appropriate file type e.g. text
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Potharaju
http://jug.org.ua/wiki/display/JavaAlmanac/ConvertingCDATANodesintoTextNodesWhileParsinganXMLFile
This will really help u:
http://www.dpawson.co.uk/xsl/characters.html
Regards
Abhishek Mahajan
**Please Reward points if helpful***
Hi
Also try with the following UDF.
public class XmlUtil {
char[] specialCharacters = { '&', '<'>', '\'' };
String[] replacementStrings = { "&", "<">", "'" };
public static String sanitizeText( String text ) {
StringBuffer buffer = new StringBuffer( text );
for( int i = 0; i < buffer.length(); i++ ) {
for( int k = 0; i < specialCharacters.length; k++ ) {
if( buffer.charAt(i) == specialCharacters[k] ) ) {
buffer.replace( i, i + 1, replacementString[k] );
i += replaceString[k].length;
} else if( (int)buffer.charAt(i) > 128 ) {
String replacement = "&#" + (int)buffer.charAt(i) + ";";
buffer.replace( i, i + 1, replacement );
i += replacement.length();
}
}
}
return buffer.toString();
}
Regards
Abhishek Mahajan
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.