I have a source XML which is like this (as shown below) in which there is one PR tag under which there can be multiple Pr Line tags but in the final XML i want the source XML (containing multiple Pr Line tags) to be split as shown in the target xml.
Source:
<PRSet>
<PR>
<PRNUM>100</PRNUM>
<VENDOR>XYZ LLC</VENDOR>
<PRLINE>
<PRLINENUM>101</PRLINENUM>
<DESCRIPTION>Burner Lamp</DESCRIPTION>
</PRLINE>
<PRLINE>
<PRLINENUM>102</PRLINENUM>
<DESCRIPTION>Stove</DESCRIPTION>
</PRLINE>
</PR>
</PRSet>
When multiple PRLine Tags are there in a single PR tag then the final xml should look like this:
Target:
<PRSet>
<PR>
<PRNUM>100</PRNUM>
<VENDOR>XYZ LLC</VENDOR>
<PRLINE>
<PRLINENUM>101</PRLINENUM>
<DESCRIPTION>Burner Lamp</DESCRIPTION>
</PRLINE>
</PR>
<PR>
<PRNUM>100</PRNUM>
<VENDOR>XYZ LLC</VENDOR>
<PRLINE>
<PRLINENUM>102</PRLINENUM>
<DESCRIPTION>Stove</DESCRIPTION>
</PRLINE>
</PR>
Can anybody provide the solution how to achieve this using XSLT Transformation. Many Thanks in Advance.