Weblogic XMLOutoutStream to java InputStream

Manoj Nair

Usenet Archive
Joined
Aug 22, 2000
Messages
17
Reaction score
0
I am using Weblogic XMLOutoutStream to create a XML file on the fly. But instead of using flush method and writing a physical file onto the disk I want to convert this outputstream to a java InputStream which can then be passed to the FOP XSLT transformer. any ideas?
 

GIMME

Usenet Archive
Joined
Jun 3, 2003
Messages
107
Reaction score
0
If the file is less than 5 megs ... I'd recommend building the xml file as a jdom element. That gives you the advantage of being able to pretty print the xml output, serialize the jdom element into a java input stream, and to read the input stream. Also, if each object has a "Element toElement" and an "Object(Element elm)" constructor you can create objects from the xml that you read via jdom. In other words, jdom was created to do what you're trying to do.

If the files is larger than 5 megs jdom is still the right tool, but you have to think about how you do things (incrementally) so you don't hog up a lot of memory.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,042
Messages
3,104,223
Members
248,131
Latest member
Tonypshaw1

Latest Threads

Top