Skip to main content
I'm having trouble using the XMLFragmente in conjunction with a HttpFetcher. The results of my httpget are correctly stored in an attribute with ISO-8859-1 encoding.

 

 

However, fragments generated by the XMLFragmenter seem to be UTF-16 encoded and I can't find a way to keep the transformer from changing the encoding.

 

 

Anyone have a good idea on how to change that?

 

 

Thanks!
Hi,

 

 

The AttributeEncoder can be used to change internal encoding of attribute values.

 

But you can specify any encoding when writing the translation result into XML file even if the encoding during the processing is UTF-16, and FME will change encoding correctly at that time.

 

Why do you need to keep the encoding at the XMLFragmenter?

 

 

Takashi
If you need to change encoding of the fragment as an XML document, the XMLFormatter might be better.
Hi,

 

thanks for your reply.

 

 

My workflow looks like this:

 

 

creator --> httpfetcher --> xmlfragmenter --> xmlflattener --> coordinatesystemsetter --> vertexcreator --> FileGeodatabaseWriter

 

 

The xml received from the fetcher is displayed correctly within the inspector. After the fragmenter, encoding problems appear in the inspector which are also present in the results I write to the FileGeodatabase. These problems are already visible within the fme-inspector, so fme doesn't seem to carry the correct encoding after the fragmenter.

 

 

Therefore, I cannot write to a any format correctly.

 

 

 

 
@Takashi:

 

 

Thanks, your suggestion worked beautifully!

 

 

Inserting an XML-Formatter before the fragmenter and thus manually changing the encoding before fragmenting the xml worked nicely. I'd still consider this a workaround to the xmlfragmenter not correctly carrying the encoding but at least I can now carry on with my data.

 

 

 

Reply