cancel
Showing results for 
Search instead for 
Did you mean: 

Getting garbage characters at the begining of xml

Former Member
0 Kudos

Hi Experts,

I am using file adapter to pick XML file. Using TEXT mode & encoding "ISO-8859-1" as it has some special characters.

But when file is picked by PI in moni XML payload contain some garbage characters at the begining of the XML declaration.

This characters is making file as invalid.

But if I open the origional file then it is not showing the characters.

Could u please help me how to remove this garbage characters frm XML file beginning.

Thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member200962
Active Contributor
0 Kudos

I am using file adapter to pick XML file. Using TEXT mode & encoding "ISO-8859-1" as it has some special characters.

This characters is making file as invalid.

Check this SAP Note: https://service.sap.com/sap/support/notes/821267

From the above SAP Note: 
16. File Encoding
XML Files
Important: Even if you configure a File Encoding in the File Adapter channel, the File Adapter will not 
-write the XML header to reflect the changed encoding, so you will probably see an XML parsing error later 
during the processing of the message if you specify an encoding.

Regards,

Abhishek.

Former Member
0 Kudos

Hi,

Are these garbage chars only at the beginning of the received file (what are they exactly, in hex or ascii form ?) ? How is the source file generated ?

Rgds

Chris