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