Skip to main content

Hello there

we are reading an XML URL , in order to extract the features and values,

we used the XML fragmenter, the problem is we need to enter the attribute to expose into the transformer setting , is there a way we could dynamically read them, because there large number and also avoid any typo problem.

 

 

Hi @boubcher,

I'm sorry, but FME currently cannot automatically populate the Attributes to Expose fields in the transformers.

However, there is a process I use to quickly expose attributes from JSON or XML sources:

  • Add an AttributeExploder after the XMLFragmenter, using the default settings.
  • Add a DuplicateFilter to remove duplicates of _attr_name
  • Write the Unique output to a CSV file, with column headers
  • Run the workspace once to create CSV file
  • Remove the new transformers, then add an AttributeExposer after the XMLFragmenter
  • In the AttributeExposer, click the Import button
  • Set Format to CSV, then select the new CSV file you created
  • Click the Next button, then set Import From to Attribute values
  • Click Next, then set Attributes to _attr_name
  • Click Import to populate the AttributeExposer with the new attributes

The Attributes to Expose setting doesn't have the Import option, so I use the AttributeExposer transformer instead.


Hi @boubcher,

I'm sorry, but FME currently cannot automatically populate the Attributes to Expose fields in the transformers.

However, there is a process I use to quickly expose attributes from JSON or XML sources:

  • Add an AttributeExploder after the XMLFragmenter, using the default settings.
  • Add a DuplicateFilter to remove duplicates of _attr_name
  • Write the Unique output to a CSV file, with column headers
  • Run the workspace once to create CSV file
  • Remove the new transformers, then add an AttributeExposer after the XMLFragmenter
  • In the AttributeExposer, click the Import button
  • Set Format to CSV, then select the new CSV file you created
  • Click the Next button, then set Import From to Attribute values
  • Click Next, then set Attributes to _attr_name
  • Click Import to populate the AttributeExposer with the new attributes

The Attributes to Expose setting doesn't have the Import option, so I use the AttributeExposer transformer instead.

Thanks @daveatsafe

Great its working


Reply