• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Author
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Harish

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

Sas Jacobs
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic