File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Parse XML File Using Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Parse XML File Using Java" Watch "Parse XML File Using Java" New topic

Parse XML File Using Java

Mahendra Chowdary

Joined: Aug 26, 2010
Posts: 25
Hi ,

May i know how we can extract data from xml file into a java collection .

Soumyajit Hazra
Ranch Hand

Joined: Jun 26, 2007
Posts: 136
You can use XML parsing by Java link as a reference.

Java Programmer | SCJP 1.5 | SCWCD 1.4
Mahendra Chowdary

Joined: Aug 26, 2010
Posts: 25
Thanks for the response
Alex Hurtt
Ranch Hand

Joined: Oct 26, 2010
Posts: 98
That is a good article for starters but it doesn't seem to touch on the newer Streaming API for XML Parsing which is part of the Java 6 API in the* packages and offers another alternative to SAX and DOM. It offers the speed of SAX parsing with the manipulation capabilities of DOM but without DOM's huge memory footprint. Just Google for 'Java streaming xml parsing api' or something and I'm sure you can find multiple tutorials for it.
Nate Lockwood
Ranch Hand

Joined: Feb 22, 2010
Posts: 83
This is an old thread but now to access the link above it is required to enter a drawing which at the least requires submission of a valid email address. I didn't do that.
I agree. Here's the link:
subject: Parse XML File Using Java
It's not a secret anymore!