Weblogic XMLOutoutStream to java InputStream

M

Manoj Nair

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?
 
G

GIMME

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
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top