Skip to main content
Question

How to setup a xml reader for unknown xml structure?

  • March 28, 2019
  • 1 reply
  • 24 views

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.

1 reply

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

 

 

 


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