*
The moose likes Java in General and the fly likes Java XML parser to parse the XML file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java XML parser to parse the XML file" Watch "Java XML parser to parse the XML file" New topic
Author

Java XML parser to parse the XML file

Anshul Chandra Saxena
Greenhorn

Joined: Sep 10, 2009
Posts: 14
Hi

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.

thanks
Anshul

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

If you want to transform one XML format into another XML format then I think using XSLT would be a good choice.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19653
    
  18

javax.xml.transform.TransformerFactory and javax.xml.transform.Transformer should be able to help you out:


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java XML parser to parse the XML file
 
Similar Threads
Create and open PDF from JSF Portlet
Portlets are not showing up after publishing the server
portlet startup problem
List of beans returning empty
Replicate XML Node using XSL