Is XML Parser _very_ strict?

Hi folks,

I was looking to expose a Task via URL trigger with a payload of an XML message, so i started mocking this up with a sample XML as a file in SLFS and a simple pipeline File Reader -> XML Parser -> do-stuff.

I didnt specify the “Inbound schema” on the XML Parser for the incoming binary XML, and even on a very simplified XML structure I’m getting:

Failure: Failed to convert xml to json, Reason: Mixed content is not supported: ’ ', Resolution: Please check if the xml data is well formed

the XML is considered valid by other non-SL tools:

<EnterpriseMessage xmlns="" xmlns:i="">
    <BusinessData xmlns="">

Is it essential to set the schema to assist the parser? Sometimes the namespaces will vary or the schema be dynamic…

Tried. Just worked for me.

Just File Reader (File name specified) -> XML parser (No changes)

Spooky, that sample works for me too it is just a redacted/cut down representation of the larger original. Maybe there were some newlines or tabs that were purged via cut/paste… Cant see anything invalid in the original, that still shows the “mixed content is not supported” error…

Had a closer look, in the original machine-generated xml the elements were indented with some kind of space characters and the parser failed. Changing these to tab characters and the parser worked fine… Just a bit confusing as the failing XML appears to be valid UTF-8 XML.

Thanks anyway,

Just check if its unix or windows filetype.

I had parser issue in past where I was using windows file on linux snaplogic runtime.