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 Spring in Action this week in the Spring 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
Author

creating objects from an XML file

lupercal hill
Greenhorn

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
Bartender

Joined: Oct 14, 2005
Posts: 18657
    
    8

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: http://aspose.com/file-tools
 
subject: creating objects from an XML file