Hi,
I've a XML of the below form
Code:
<root>
<para>//this should be section 1
<para></para>//this should be section 2
</para>
<para>//this should be section 1
<para>//this should be section 2
<para></para>//this should be section 3
</para>
</para>
<root>
here i need to scan the place where the para is present and assign the section number as given in above XML(The comments), i'm very confused because all the node names are para and i'm unable to find a pattern to do this. please let me know how this can be done.
The expected output is as below.
Code:
<root>
<para section="1">
<para section="2"></para>
</para>
<para section="1">
<para section="2">
<para section="3"></para>
</para>
</para>
<root>
And also i want this to be done from the `para` template match.
Thanks