Skip to main content
Solved

reading xml with feature_reader transformer

  • September 2, 2015
  • 5 replies
  • 70 views

tono
Contributor
Forum|alt.badge.img+11
  • Contributor
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

Best answer by ken

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

 

 

View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

Forum|alt.badge.img
  • September 2, 2015
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

fmelizard
Safer
Forum|alt.badge.img+18
  • Safer
  • September 3, 2015
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

Forum|alt.badge.img
  • Best Answer
  • September 3, 2015
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

 

 


takashi
Influencer
  • September 4, 2015
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

tono
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • September 7, 2015
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!

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings