XML parser and writing

R

Roy Epperson

I've looked a year ago a the various XML parsers but got tired trying to get
them set. I have an internal project that I will manually create XML files
and I want to then read and then do "stuff".

What XML parser are "light weight" and easy to setup?

Roy
 
W

Wendy S

Roy said:
I've looked a year ago a the various XML parsers but got tired trying to
get
them set. I have an internal project that I will manually create XML
files and I want to then read and then do "stuff".

What XML parser are "light weight" and easy to setup?

I use JDOM, and I don't worry about the parser.

String input = "...xml...here...";
Document doc = new SAXBuilder().build( new StringReader( input ) );
List elements = doc.getRootElement().getChildren("tagName");

That 'Document' is an org.jdom.Document. I seem to recall issues with
whitespace with other parsers... not an issue with JDOM.

I won't say it's blazingly fast or anything, but it works.
 
J

Jon A. Cruz

Roy said:
I've looked a year ago a the various XML parsers but got tired trying to get
them set. I have an internal project that I will manually create XML files
and I want to then read and then do "stuff".

What XML parser are "light weight" and easy to setup?


You can use the one that's built into Java as of 1.4

Or you could try AElfred.

http://saxon.sourceforge.net/aelfred.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top