Notepad++ saves XML with BOM (Byte-Order-Mark)

Hi All,

This is just to share an experience I had while doing some XML transform mappings. I had a sample ProcessCustomerPartyMaster BOD and I used the graphical mapper to transform this into SyncCustomerPartyMaster. To read this Process BOD file, I used a file drop location and directly saved an XML in this path using NotePad++. Once this file went through the mapping in Dataflow, it generates an error saying,

Error Reason
Transformer could not transform message. Reason: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.

The issue was, NotePad++ saves XML files with byte-order-mark (BOM) and in the graphical mapper as a default, BOM is set to be "no". 

<xsl:output method="xml" encoding="UTF-8" indent="no" byte-order-mark="no"/>

BOM is used to identify whether the file is in big-endian or little-endian. In UTF-8 this is not mandatory. In my NotePad++ I was using the encoding method UTF-8 without BOM, but still, when I save the file it saved with BOM. 

There might be another option in NotePad++ to save without BOM, but I switched to another notepad (Sublime Text) and it worked without any issue.

 

Thank you,

Lahiru.