Forums Register Login
Java XML parser to parse the XML file

I have a requirement wherein i have to parse an XML file and generate a new XML file out of that.

My XML file looks like this

My file has many entries like these. Now i have to parse this XML file and have to produce an output like this for all the entries:

Can anyone please help me with this.


If you want to transform one XML format into another XML format then I think using XSLT would be a good choice.
javax.xml.transform.TransformerFactory and javax.xml.transform.Transformer should be able to help you out:
All of life is a contant education - Eleanor Roosevelt. Tiny ad:
Download Free Java APIs to Work with Office Files and PDF

This thread has been viewed 1583 times.

All times above are in ranch (not your local) time.
The current ranch time is
Dec 12, 2018 23:47:47.