Skip to main content
Solved

Multiple values of elements XML to separate attributes

  • August 25, 2020
  • 2 replies
  • 122 views

pzwaag_wf

I have been puzzling for a while how to process data available on the Dutch portal www.pdok.nl

After downloading a gml-file (type Dutch TOP 10 GML), I would like to extract the information stored in elements and convert this information into attributes.

Therefore I use the XMLQueryExtractor. This does the job, information is temporarily stored in lists but this is a very timeconsuming process. Examples of elements with multiple values from the featuretype ‘Wegdeel’ are naam, typeWeg ,hoofdverkeersgebruik and fysiekVoorkomen.  Is there a more efficient method?

 

I have attatched an example workspace…

 

Many thanks in advance.

 

(v 2019.2.2)

Best answer by debbiatsafe

Hi @pzwaag_wf​ 

I don't believe it's necessary to XMLXQueryExtractor to store the attribute values in a list and then parse out the values again.

The attribute values are stored in lists, which are not automatically exposed on features. Simply use the AttributeExposer to expose the attributes. I have attached an example of this workflow. I hope this helps.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

debbiatsafe
Safer
Forum|alt.badge.img+21
  • Safer
  • 648 replies
  • Best Answer
  • August 26, 2020

Hi @pzwaag_wf​ 

I don't believe it's necessary to XMLXQueryExtractor to store the attribute values in a list and then parse out the values again.

The attribute values are stored in lists, which are not automatically exposed on features. Simply use the AttributeExposer to expose the attributes. I have attached an example of this workflow. I hope this helps.


pzwaag_wf
  • Author
  • 9 replies
  • August 27, 2020

Hi @pzwaag_wf​ 

I don't believe it's necessary to XMLXQueryExtractor to store the attribute values in a list and then parse out the values again.

The attribute values are stored in lists, which are not automatically exposed on features. Simply use the AttributeExposer to expose the attributes. I have attached an example of this workflow. I hope this helps.

​Dear Debbi,

You are abolutely right, this saved many, many hours.....

 

Thank you very much.

Kind regards,

Pim van der Zwaag.