This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes convert beans to XML and retun out of a function Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "convert beans to XML and retun out of a function" Watch "convert beans to XML and retun out of a function" New topic
Author

convert beans to XML and retun out of a function

Sven
Greenhorn

Joined: Aug 31, 2004
Posts: 6
Hi
i whould like to convert my java bean into xml and then send it over a network to decode it en build my beans back

i know you can use XMLEncoder e = new XMLEncoder(
new BufferedOutputStream(
new FileOutputStream("Test.xml")))
but i wonderif there is a way to not save it as a file first and return a stream or a string in my function

like this :
public String getPaginaToXML() {
return "converted bean as xml"
}

thanx
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Hi,
Welcome to Javaranch,
May i request you to change your display name as indicated in http://www.javaranch.com/name.jsp
Thank you.
[ September 28, 2004: Message edited by: Balaji Loganathan ]

Spritle Software Blogs
 
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: convert beans to XML and retun out of a function
 
It's not a secret anymore!