Skip to Content
avatar image
Former Member

Accessing Parent Node of an XML through XSLT

Hi,

I want to loop at the child node and need to find out its parent node.

Kindly let me know how to traverse back using XSLT.

<u><b>sample source structure:</b></u>

<level1>

<level2>

<level 3>

<part number> 123 </part number>

</level3>

<level3>

<part number> 1 </part number>

</part number> 2 </part number>

</level3>

</level2>

</level1>

<u><b>target:</b></u>

<group>

<part Number> 123 </part number>

<level3> </level3>

<level2> </level2>

<level1> </level1>

</group>

<group>

<part Number> 1</part number>

<level3> </level3>

<level2> </level2>

<level1> </level1>

</group>

<part Number> 2 </part number>

<level3> </level3>

<level2> </level2>

<level1> </level1>

</group>

Kindly let me know how to traverse back by looping at the part number.

Regards,

Swaroopa

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Aug 29, 2007 at 06:46 AM
    Add comment
    10|10000 characters needed characters exceeded