File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 agree. Here's the link: http://aspose.com/file-tools
 
subject: convert beans to XML and retun out of a function