Skip to main content
Question

XML Templater with multiple inputs


dms2
Contributor
Forum|alt.badge.img+11
  • Contributor

I'm just a newbie with fme and I'm having very basic problems when working with transformers.

First off, I want to connect several readers to the input Root port of XML Templater. The transformer shows no error when I do it, but when I run the workspace it does generate an error since only the data of one of the inputs is taken into account but the root template needs values from both inputs.

Working with sub templates is not an option for me as I will never really know what elements in my xml template will take values from one or another input. I have no control on the key-value pairs present in each json input.

2 replies

jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • March 1, 2018

If I understand this correctly, each json feature has a subset of the key-value pairs needed for the xml, but it's variable as to which json feature contains which data.

 

 

Could you not aggregate or otherwise merge your json data so that there is only one feature (containing all the key-value pairs) going to the XMLTemplater?

dms2
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • March 2, 2018
jdh wrote:

If I understand this correctly, each json feature has a subset of the key-value pairs needed for the xml, but it's variable as to which json feature contains which data.

 

 

Could you not aggregate or otherwise merge your json data so that there is only one feature (containing all the key-value pairs) going to the XMLTemplater?
Thank you for the tip! As I said I'm having very basic (and stupid) problems. I looked for some transformer with the 'merge' or 'aggregate' key words and found out the Aggregator transformer. It does exactly what I need.

 

 


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