wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes creating objects from an 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 "creating objects from an XML file" Watch "creating objects from an XML file" New topic

creating objects from an XML file

lupercal hill

Joined: Sep 28, 2005
Posts: 9
I want to pull data from an XML file and place it in a java object. Im using SAX to parse the file .

Do I need to wrap XML data in an objectinputstream method to use the values?
Paul Clapham

Joined: Oct 14, 2005
Posts: 18541

An ObjectInputStream???

No. You get data from SAX as strings. Those strings may be element names or attribute values or text nodes or whatever. You can use normal Java programming techniques to create objects that contain those strings.
Don't get me started about those stupid light bulbs.
subject: creating objects from an XML file
Similar Threads
Extract db data into a XML
Extract xml to store into db
Reload XML, before Parsing
Tomcat gets crazy...
How to do XML to DB using Message Driven Bean?