Forum Discussion

Nico63's avatar
14 years ago

holder.getDomNodes - Copy/Paste Children of a DomNode

Hi !

I'm need to create multiple tree nodes in a request using a datasource with Groovy. Each treenode correspond to a datasource row.
I already tried using this post viewtopic.php?f=5&t=3629#p12725 without success.

ex: datasource "Trajet" data
row1 = foo1 , fooo1, foooooo1, faaaaa1
row2 = foo2 , fooo2, foooooo2, faaaaa2
row3 = foo3 , fooo3, foooooo3, faaaaa3
...

here is the request I would like :
<Trajets>
<Trajet>
<identifiant>foo1</identifiant>
<autre1>fooo1</autre1>
<autre2>foooooo1</autre2>
<autre3>
<spe>faaaaa1</spe>
</autre3>
</Trajet>
<Trajet>
<identifiant>foo2</identifiant>
<autre1>fooo2</autre1>
<autre2>foooooo2</autre2>
<autre3>
<spe>faaaaa2</spe>
</autre3>
</Trajet>
<Trajet>
<identifiant>foo3</identifiant>
<autre1>fooo3</autre1>
<autre2>foooooo3</autre2>
<autre3>
<spe>faaaaa3</spe>
</autre3>
</Trajet>
...

</Trajets>

knowing the structure of a "trajet" come from another request :
<Trajets>
<Trajet>
<identifiant></identifiant>
<autre1></autre1>
<autre2></autre2>
<autre3>
<spe></spe>
</autre3>
</Trajet>
</Trajets>

Any help appreciated.

Thank you in advance.
No RepliesBe the first to reply