aspose file tools*
The moose likes Java in General and the fly likes JAVA API to Read XML File? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "JAVA API to Read XML File?" Watch "JAVA API to Read XML File?" New topic
Author

JAVA API to Read XML File?

Sunny Jain
Ranch Hand

Joined: Jul 23, 2007
Posts: 433

Hi All,

I want to read XML files using J2SE, I am confused whether should I treat the XML as text file and start reading OR Is there any JAVA API that can help me in that?


Thanks and Regards,
SCJP 1.5 (90%), SCWCD 1.5 (85%), The Jovial Java, java.util.concurrent tutorial
Petrus Pelser
Ranch Hand

Joined: Feb 20, 2006
Posts: 132
You can use either SAX or DOM.
Nitesh Kant
Bartender

Joined: Feb 25, 2007
Posts: 1638

javax.xml package contains the related api. Googling "java xml parsers" will give you useful results.


apigee, a better way to API!
Jolly Tiwari
Ranch Hand

Joined: Mar 26, 2006
Posts: 77
this link may give you some idea...

http://www.developer.com/xml/article.php/600801


Regards

Jolly
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19541
    
  16

JDOM is a well-known DOM library.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
I actually prefer http://www.dom4j.org/

Both DOM and SAX are programming language agnostic APIs, which make them kind of awkward to use from a Java perspective (for example, they don't use Java collections were it would be appropriate).


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JAVA API to Read XML File?
 
Similar Threads
create file
XML API
API for reading/writing PDF in java
help on xml wit java
validation