This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android 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: 86
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 agree. Here's the link: http://aspose.com/file-tools
 
subject: Converting a DTO object to an XML File
 
Similar Threads
java.lang.NumberFormatException: For input string: "139.56"
XSD for JPA 2.0
Java -> XML Binding Tool
Difference between PO(page object),PFO(page file object),DAO(data access object) and DTO?
Process Object --- Design Pattern ???