wood burning stoves 2.0
The moose likes XML and Related Technologies and the fly likes Read XML file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Read XML file " Watch "Read XML file " New topic

Read XML file

rastas biggs
Ranch Hand

Joined: Sep 24, 2004
Posts: 41
Can some one point me in the right direction, I want to read attributes from an XML file, does some one have some example code I can use?

I just want to read the attributes and assign to string or an array.

I'm more interested in getting a value type like "BlokesName_nickName" when I pass a value into a method like name, example below.

<BlokesName name="Bazza">
<BlokesName_nickName>Block Head</BlokesName_nickName>
<BlokesName name="Bazza">
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
Moving to our XML forum...

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
pradeep jaladi
Ranch Hand

Joined: Nov 21, 2004
Posts: 65

Check out some of same from
Xml Samples

I think they can point you in rigth direction

Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3640
I believe following link may be helpful to you upto major extend

XML to Object[] Utility
[ May 27, 2005: Message edited by: Chetan Parekh ]

My blood is tested +ve for Java.
I agree. Here's the link: http://aspose.com/file-tools
subject: Read XML file
It's not a secret anymore!