How to use XML in Java

K

Knitter

Hi,
I've recently stated to lean XML. I've used the w3c school tutorials
and one O'Reilly book to learn it. The concepts are quite simple, at
least those that I've seen and I'm liking it by the minute. Still there
are things I don't understand.
I know that Java specifies an API for XML, but those Java implement
that API? Is there a XML parser in the Java API? Maybe I 'm not
undertanding this the write way....
I've "googled" for parsers and have been looking at the saxproject,
xerces and piccolo, but I would like the tools from sun's JDK and not
to add a library to my small project.

Can someone give me some insight on how one starts to use XML in a Java
application? I know this is a very vague question, but that's just my
lack of knowledge on the subject talking :)

Thanks
 
H

hilz

Knitter said:
Hi,
I've recently stated to lean XML. I've used the w3c school tutorials
and one O'Reilly book to learn it. The concepts are quite simple, at
least those that I've seen and I'm liking it by the minute. Still there
are things I don't understand.
I know that Java specifies an API for XML, but those Java implement
that API? Is there a XML parser in the Java API? Maybe I 'm not
undertanding this the write way....
I've "googled" for parsers and have been looking at the saxproject,
xerces and piccolo, but I would like the tools from sun's JDK and not
to add a library to my small project.

Can someone give me some insight on how one starts to use XML in a Java
application? I know this is a very vague question, but that's just my
lack of knowledge on the subject talking :)

Thanks



The JDK has built in support for SAX and DOM.
see this:
http://java.sun.com/j2se/1.5.0/docs/guide/xml/jaxp/index.html

but there are third party libraries that might be easier to use such as
dom4j: http://www.dom4j.org/

HTH
 
K

Knitter

Thanks for the replies. That Java Almanac has a few texts that made
things clear. I'm also using "XML in a Nutshell" from O'reilly and I
just reached a part where the author explains better what is and how to
use XML in applications.

Again thank you for the help, I sometimes thing that I see a google
different from what other users see :D

Thanks,

Best regards,

Sérgio
 

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

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,144
Latest member
KetoBaseReviews
Top