Skip to main content
Solved

Multiple values of elements XML to separate attributes


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.

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

2 replies

debbiatsafe
Safer
Forum|alt.badge.img+20
  • Safer
  • 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
  • August 27, 2020
debbiatsafe wrote:

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.


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