Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Aug 29, 2007 at 06:46 AM
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.