generate index
Hi,
Below provided is the source and the transformed xml. I am facing problem generating the value for 'index' attribute of the <C> tag in the transformed XML. As the data needs to be read from two different nodes, i am not sure how to do this. any help on this would be great.
Structure of source XML:
<A>
<B>
<F>
<C>
<name> bnn </name>
.
.
</C>
<C>
<name> wer</name>
.
.
</C>
<C>
<name> 234</name>
.
.
</C>
</F>
<D>
<E>
<C>
<name> tyu</name>
.
.
</C>
<E>
</D>
</B>
</A>
Structure of transformed XML:
<A>
<B>
<D/>
<new-node>
<C index=0>
<name> bnn </name>
.
.
</C>
<C index=1>
<name> wer</name>
.
.
</C>
<C index=2>
<name> 234</name>
.
.
</C>
<C index=3>
<name> tyu</name>
.
.
</C>
<new-node>
</B>
</A>
|