Win a copy of Murach's Java Programming this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to convert java object into xml .Object contains contains cyclic references  RSS feed

 
santro
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

How to convert java object into xml .Conside this case ,if Object contains cyclic references like circular linked list. I tried with Jaxb2.0 and castor0.9.5.3.Jaxb and castor is working fine for simple java objects, not working for circular linked list type objects. Please help me .

Thanks in Advance,

Santa
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I recall, XStream handles circular graphs just fine. One limitation is that you don't have much control over the specific XML format used. Well, you can change some things easily, but not others. If this is important to you, you may want to use XStream for an initial transformation, followed by XSLT to make whatever changes you need to the format.
 
santro
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi JIM,

THANK YOU VERY MUCH

Thanks,

Santa Rao
 
Forget Steve. Look at this tiny ad:
Thoughts on deprecation in Java
https://coderanch.com/t/683016/java/Deprecation-Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!