aspose file tools*
The moose likes I/O and Streams and the fly likes How to stream xml document to inputSource? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "How to stream xml document to inputSource?" Watch "How to stream xml document to inputSource?" New topic
Author

How to stream xml document to inputSource?

Pete Neu
Ranch Hand

Joined: Feb 18, 2005
Posts: 86
Hello,

in my webapp I want to stream an generated xml document to an instance of org.xml.sax.InputSource in order to process it further with an xslt file in an XSLT Transformation. My question: how do I generate the xml file to an stream?

The code looks like this:




-Pete
[ December 06, 2005: Message edited by: Pete Neu ]
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Well, what form is this document in? If it's a file, then there's a StreamSource constructor that takes a file. That's what you want.

Is that what you were asking?


"I'm not back." - Bill Harding, Twister
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

You want to feed the output of one transformation into the input of a second transformation? I think you might find that in ERH's book:

http://www.cafeconleche.org/books/xmljava/chapters/index.html

Probably chapter 8 but I'm not sure.
Pete Neu
Ranch Hand

Joined: Feb 18, 2005
Posts: 86
Hello,

yes that's the case the input comes from a relational database and is transformed to xml and the result of the transformation is the input of the xslt transformation.

I looked up the reference above. But what do I exactly look for to do the job?
 
Don't get me started about those stupid light bulbs.
 
subject: How to stream xml document to inputSource?