Skip to main content
Hi,

 

 

I am trying to read an xml file with Feature_reader transformer (FMEDesktop 2015 64b) and I always get this error:

 

 

A fatal error has occurred. Check the logfile above for details:

 

...

 

invalid byte '”' at position 1 of a 1-byte sequence

 

XML Parser error: 'invalid byte '”' at position 1 of a 1-byte sequence'

 

A fatal error has occurred. Check the logfile above for details.

 

...

 

 

If i read it with with XML reader there is no problem at all. But as I need to read a whole folder with a set of xml files i will need to do it with the feature reader (reading the path)

 

 

It would be a great help if someone could help me.

 

Thanks in advance,

 

Antonio Armas
Hi Antonio

 

Is it possible to post a sample XML file? Also are you using Feature Paths and Elements to Match in the reader?

 

Thanks

 

Ken
Hi,

 

 

I can confirm that the FeatureReader returns an error. An alternative way to read multiple xml files would be to use the text reader on the folder containing the xml files and the XML Fragmenter (or multiple ones if you have other XML schemas)

 

Hope this helps,

 

Itay
Hi Tono,

 

I get a different error if enter the feature path as "respons" and enable flattening (see screen shot), so anyway even if it's not the same error as you have, something is not quite right here and I will follow-up.  If I do not enable flattening it works for me.

 

 

As a work-around until we sort this out you could use the FeatureReader with the Text File format, set the parameter "Read Whole File at Once".  Then you can use the XMLFlattener to create the appropriate attributes with same settings I used above. Does that help?

 

 

Ken

 

 


Hi Antonio,

 

 

I was not able to reproduce the same error as yours, but the Enable Flattening didn't work with the FeatureReader, as Ken mentioned.

 

The XMLFragmenter can read XML file directly and work with the Enable Flattening.

 

In the interim, can you use it as a workaround?

 

 

Takashi
Hi all and thanks for your help.

 

 

It worked reading as a txt file, but what i did is reading them as xml files using a private parameter as a file path (*.xml) and it worked also. :)

 

 

Thanks Ken, Itay and Takashi!

Reply