Solved

explode the properties of an XML element into attributes

  • 18 September 2018
  • 3 replies
  • 10 views

Badge +1

I have a bulk soap extract that has a list of assets with attributes as properties, not elements. I cannot find in the many XML transformers what I need to do to get the assets back into a simple table with each property as an attribute.

Here is a snippet of the first two AssetSummary elements.

icon

Best answer by takashi 18 September 2018, 08:12

View original

3 replies

Userlevel 2
Badge +17

Hi @kimo, you can use the XMLFragmenter (Elements to Match: AssetSummary, Flatten Options/Enable Flattening: <checked>) to extract every attribute in the AssetSummary element as feature attributes.

Resulting features will have attributes which are named "AssetSummary.<original attribute name>", like this. Just be aware that you will have to expose them if necessary.

Userlevel 2
Badge +17

Hi @kimo, you can use the XMLFragmenter (Elements to Match: AssetSummary, Flatten Options/Enable Flattening: <checked>) to extract every attribute in the AssetSummary element as feature attributes.

Resulting features will have attributes which are named "AssetSummary.<original attribute name>", like this. Just be aware that you will have to expose them if necessary.

In addition, you can use the BulkAttributeRenamer (Rename: All Attributes, Action: Remove Prefix String, String: AssetSummary.) to remove the prefix "AssetSummary." from all the attribute names.
Badge +1
In addition, you can use the BulkAttributeRenamer (Rename: All Attributes, Action: Remove Prefix String, String: AssetSummary.) to remove the prefix "AssetSummary." from all the attribute names.
Yes, did all that. That's the easy part!

 

 

Reply