Skip to main content

Hello,

is anybody here, who could help me with XML creating please?

What I have to solve: I have one feature with list of references to another features. I need to create XML record which contains all of these references and also keeps number of reference in Index. Example is below:

I know that I have to use XMLTemplater, I am able to create schema, but I cant identify, how to figure out list values behaviour and also how to insert into index parameter sequenced value from list.

Thank You so much!

Lubo

Hi @lazarlubomir, this expression might help you.

<Attribute Name="SAF" Class="PDB">{
for $name at $i in fme:get-list-attribute("_list{}")
return <RefObject Index="{$i}" Name="{$name}" />
}</Attribute>

See here to learn more about For Clause in XQuery language: For Clause


Hi @lazarlubomir, this expression might help you.

<Attribute Name="SAF" Class="PDB">{
for $name at $i in fme:get-list-attribute("_list{}")
return <RefObject Index="{$i}" Name="{$name}" />
}</Attribute>

See here to learn more about For Clause in XQuery language: For Clause

Briliant answer as everytime! Thank You so much!

 

 


Reply