This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Web Services and the fly likes Converting a DTO object to an XML File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Converting a DTO object to an XML File" Watch "Converting a DTO object to an XML File" New topic
Author

Converting a DTO object to an XML File

Fred Victa
Ranch Hand

Joined: May 01, 2008
Posts: 139
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

Joined: Oct 04, 2006
Posts: 2198
    
    1
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!


My free books and tutorials: http://www.slideshare.net/krizsan
Yair Ivan
Greenhorn

Joined: Jul 13, 2008
Posts: 15

Hi:

Other option:

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

Bye.


SCJP 6.0, SCBCD 5.0, SCDJWS 5.0
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Converting a DTO object to an XML File
 
It's not a secret anymore!