Skip to main content
Question

How to setup a xml reader for unknown xml structure?

  • March 28, 2019
  • 1 reply
  • 28 views

mwoj
Contributor
Forum|alt.badge.img+1

I'm processing many xml file which can change their structure (various tagging names or position in the hierarchy). No XSD is availible. and even if I build one the new xml can have new tagging so each time I create new reader based on the all new xmls files population to verify if there is a new tagging vs old groups.

Is there any agile way to setup a reader to discover new tags and add them to the reader while reading xml? I can handle new tags later in workspace but I miss the knowledge how to set xml reader to autodiscover and proces new tags by default while I start FME workspace using bat files.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, 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.

1 reply

jdh
Contributor
Forum|alt.badge.img+40
  • Contributor
  • March 29, 2019

Without an XDS you can't take the easy route and use a schemaReader.

 

 

What if you used XMLFlattener with Element to Match set to *, (flattening enabled), then the SchemaSetter Custom transformer.

You would end up with all the attributes in an attribute list. You would need to clean it up a bit to remove instance level attributes.

 

 

xmlschema.fmw