How to read an XML file with Java?

Posted by Yatendra Goel on Stack Overflow See other posts from Stack Overflow or by Yatendra Goel
Published on 2010-02-25T11:09:34Z Indexed on 2010/03/27 12:23 UTC
Read the original article Hit count: 310

Filed under:
|

I don't need to read complex XML files. I just want to read the following configuration file with a simplest XML reader

<config>
    <db-host>localhost</db-host>
    <db-port>3306</db-port>
    <db-username>root</db-username>
    <db-password>root</db-password>
    <db-name>cash</db-name>
</config>

How to read the above XML file with a XML reader through Java?

© Stack Overflow or respective owner

Related posts about java

Related posts about Xml