How to read XML file in java

Hi everyone...

I m new to XML and i was wondering if there is any easy way to read XML file in java....for example:

<?xml version="1.0" encoding="UTF-8"?>

<root>

<serverName type="String">myServer</serverName>

<serverPort type="int">1433</serverPort>

<instanceName type="String">serverInstance</instanceName>

<databaseName type="String">myDatabase</databaseName>

<userName type="String">username</userName>

<password type="String">password</password>

</root>

I was reading on the web that i need to use some sort of DTD or some other file...but i dont know if all this is neccessary to read XML file...and as u have probablly seen i m trying to use XML file to get some data to connect to database...maybe i m doing it the wrong way...but i m really really green in this area so any help would be great!

Thnx in advance and P.S. i would really like to have some simple example on how its done....thnx again!

[1076 byte] By [Samuraya] at [2007-11-26 15:52:36]
# 1
http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/index.html
DrClapa at 2007-7-8 22:12:55 > top of Java-index,Java Essentials,Java Programming...