Question

XML Parser Error - Invalid Byte


Badge

I need a work around for this error. I am using XML reader to extract XLE files to CSV. Anyone have any suggestions? It's weird because some XLE files work, while others dont, all depending on how the file was originaly downloaded. PLEASE SEE COMMENT THREAD How to format CSV Output for more information on my issue.


4 replies

Userlevel 2
Badge +17

Hi @lucasghd,

This error is usually caused by the XML header stating the incorrect encoding for the file. If the file is set to utf-8, try changing to your local system encoding, or vice-versa, using a text editor.

Badge

Hi @lucasghd,

This error is usually caused by the XML header stating the incorrect encoding for the file. If the file is set to utf-8, try changing to your local system encoding, or vice-versa, using a text editor.

Someone else recommended this, but i wasnt able to get it working. Perhaps i'm not doing something correctly afterwards? Would i not then just add a CSV writter after this?

Userlevel 6
Badge +32

Someone else recommended this, but i wasnt able to get it working. Perhaps i'm not doing something correctly afterwards? Would i not then just add a CSV writter after this?

I tried the solution @takashi provided and it worked like a dream. Be aware the XMLFragmenter Elements to Match field is case sensitive, this is what I did wrong initially.

FME 2019 template attached.

encodeandread.fmwt

Badge

I tried the solution @takashi provided and it worked like a dream. Be aware the XMLFragmenter Elements to Match field is case sensitive, this is what I did wrong initially.

FME 2019 template attached.

encodeandread.fmwt

Yours did work like a dream! thank you very much. @takashi thank you as well!

Reply