Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible deserialize XML file into object without serialization

Status
Not open for further replies.

yuddy

Programmer
Jun 23, 2008
1
US
Is is possible to deserialize the XML file into object without serialize object into XML file before. That means the XML file is created manully and read only. can I use the deserializer to retrieve the object from this XML file?
 
Which programing language?
With Java you can use for example jdom to read an xml file to a Document object. You can then parse this Document to create your own object. No need to serialize the object to xml previously.

Also, with xstream you can read an xml file and create an object. There is no need to serialize before, but you must create the class before.

With JAXB you can also create an object from an xml file, but in this case you must create the xml schema before.

In other languages I suppose there are similar features.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top