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

Converting a DTO object to an XML File

 
Fred Victa
Ranch Hand
Posts: 185
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How would I convert a DTO object to an XML file? The XML file needs to conform to a certain schema.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Create JAXB bean classes from the XML schema and, programmatically, transfer data from the DTO to instances of the JAXB bean classes.
Then serialize to XML.
Best wishes!
 
Yair Ivan
Greenhorn
Posts: 15
Eclipse IDE Firefox Browser Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi:

Other option:

http://commons.apache.org/betwixt/guide/start.html

Bye.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic