Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java program to convert pojo object to pojo xml

 
pavithra murthy
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello friend ,

this question is not related to the other one ...

since i have developed this in webmethods and in the pipeline i have a pojo object getting created .
so my problem is from a pojo object how to convert to pojo xml format .

{main part is like the conversion of pojo object to pojo xml}


i need to write a java program to convert a pojo object to pojo xml .

i think that i need to use typecasting because i already have a pojo object(and object is used when we are not sure of the datatype).

now this pojo object i need to convert to pojo xml . but the point is how typecast to an xml .

Thanks in advance.

 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Casting doesn't transform anything - it is a way to tell the Java compiler that an object is of a particular type when the compiler has no way of knowing that for itself. No XML is involved.

Is this related to this other question of yours? If so, please elaborate in the other topic, otherwise tell us in more detail here what you're trying to do.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic