File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes About XML serialization(Sas Jacobs what you conclude after reading this?) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "About XML serialization(Sas Jacobs what you conclude after reading this?)" Watch "About XML serialization(Sas Jacobs what you conclude after reading this?)" New topic
Author

About XML serialization(Sas Jacobs what you conclude after reading this?)

Harish Tiruvile
Ranch Hand

Joined: Dec 01, 2005
Posts: 99
XML that is written does not contain the expected data.
first i wrote a class Person which takes two parameter one int and String types....inside Person class i had created an Age Object class using int data...Person class is having getter and setter methods for Name and Age properties

if i encode the class Person ,in XMl file i am not getting Age data...i got only name data in XMl file


XML that is written contain the expected data.

this time i changed Person class..now it is taking 2 parameter one Age Object and another String..Person class is having getter and setter methods for Name and Age properties,same as that of previous code..This time when i encode Person Object i got the result what i expected...

i made Only 1 change replaced primitive argument int to Age object ...And created Age Object in EncoderLogicImplemented class..as shown below

Can anyone tell me what i can conclude from this....
1)Does Instance variable/DATA written to XMl file depends whether we have declared that perticular instance variable inside Encoder logic class (suppose if we have not written that variable/data inside EncoderLogic class then that variable wont be written in XML file...is it true?)

I have posted this doubt in javaranch few days back..Did not got answer..so i posted a part of my doubt once again....you can see that complete post Here


Giving up is the easiest thing in the world to do..but holding it together when everything seems like falling apart is true strength!!
with regards, Harish.T
Sas Jacobs
Author
Ranch Hand

Joined: Jun 24, 2006
Posts: 46
Hi Harish

I can't conclude anything. I'm not a Java developer!

Sas Jacobs
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: About XML serialization(Sas Jacobs what you conclude after reading this?)
 
Similar Threads
Can i append data to existing XML file?
XMLEncoder
Problem with serialization
Map object through servlet?
Significance of XML encoding/decoding over Serialization