my dog learned polymorphism*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Read XML file " Watch "Read XML file " New topic
Author

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_favoriteBeer>Stella</BlokesName_favoriteBeer>
<BlokesName name="Bazza">
Ilja Preuss
author
Sheriff

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
hi,

Check out some of same from
Xml Samples

I think they can point you in rigth direction


Pradeep.Jaladi
Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636
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
 
Similar Threads
ant problme
tiles definition
dom4j / default attributes?
appending to xml file in castor
trying to get another aspect of the rich tree working