I have an Input XML File - "Input XML File.xml". This file contains a) Product/Product Group Hierarchy, and b) Individual Products within each Product Group.
Each Product Group XML tag defines the list of products within that group. (E.g. "Nokia Handsets" product group has handsets Nokia E61 and Nokia E71)
I would like to use XSL and convert the input file into two separate output files as follows:
1. Output XML File - ProductGroups.xml: Containing the Product Groups
I will use the XML file using my application to display a product hierarchy as below. [Please note, that I need help only in creating the Output XML file, the application already takes care of the rest. The below hierarchy is shown just to give the overall picture]
--> Nokia Handsets
- Nokia E61
- Nokia E71
--> Samsung Handsets
- Samsung Wave
- Samsung Galaxy
--> Car Chargers
- Nokia Car Chargers
- Samsung Car Chargers
2. Output XML File - Products.xml: Containing individual products.
PS - I am attaching sample Input and expected Output files for ready reference.
Please could you help me with the XSL transformation to do this.
I appreciate your help!