Skip to main content
Solved

explode the properties of an XML element into attributes

  • September 18, 2018
  • 3 replies
  • 33 views

kimo
Contributor
Forum|alt.badge.img+10
  • Contributor

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.

Best answer by takashi

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.

View original
Did this help you find an answer to your question?

3 replies

takashi
Influencer
  • Best Answer
  • September 18, 2018

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.


takashi
Influencer
  • September 18, 2018
takashi wrote:

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.

kimo
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • September 19, 2018
takashi wrote:
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!

 

 


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