Ask Your Question

Revision history [back]

Your file has a UTF-8 byte order mark (BOM) at the beginning. This is actually not recommended for UTF-8 data and the Java parsers don't handle it.

You can work around it by creating a pipeline to preprocess the XML, removing the BOM. Here's one I just created:

image description

Note - I don't even use regular expressions to remove the BOM, since we know the offending line is at offset zero and we know exactly what the first line of the file should be, so we just use that verbatim. Here's the expression, so it's easy to copy/paste:

${(record:attribute('offset') == 0) ? '<?xml version="1.0" encoding="utf-8"?>' : record:value('/text')}