You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Mirth Connect 4.2.0 to read an XML File.
The Source Connector Inbound is set to XML. Using Batch Processing and splitting the Batch by Element Name
The inbound file contains UTF 8 BOM {ISO-8859-1} character
{<?xml version="1.0" encoding="UTF-8">}
in the first line which causes it to throw
"Content is not allowed in prolog" error.
I tried
return message.replace(/\uFEFF/g,'') in the Preprocessor but it seems code does not reach upto that line and throws error.
Any suggestions to bypass or remove this character so I can parse the XML File
The above solution only works when i disable the Batch Processing.
When I enable batch processing and split batches by Element it still throws "Content is not allowed in prolog".
Actually I doubt the process even comes to Preprocessor as I am not able print any logger before the return statement in Preprocessor.
Any suggestion on how to handle this while Batch Processing Mode is ON
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Using Mirth Connect 4.2.0 to read an XML File.
The Source Connector Inbound is set to XML. Using Batch Processing and splitting the Batch by Element Name
The inbound file contains UTF 8 BOM {ISO-8859-1} character
{<?xml version="1.0" encoding="UTF-8">}
in the first line which causes it to throw
"Content is not allowed in prolog" error.
I tried
return message.replace(/\uFEFF/g,'') in the Preprocessor but it seems code does not reach upto that line and throws error.
Any suggestions to bypass or remove this character so I can parse the XML File
Thank you in advance
Beta Was this translation helpful? Give feedback.
All reactions