aspose file tools
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 The Software Craftsman this week in the Agile 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: 19357

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.
I agree. Here's the link:
subject: creating objects from an XML file