streaming "for xml" to sax xslt-transformation

This is a discussion on streaming "for xml" to sax xslt-transformation within the JDBC JAVA forums in Framework and Interface Programming category; hello, i'm wondering if anybody can point me to an example how to stream the resultset (containing XML) to a SAXParser ? the query gets returned with: "FOR XML RAW" so the xml is broken up into multiple records. for example: record1: <row UNIQUEID="53380601" a="53" /> (.... heaps more of these records ....)<row UNIQUEID="5311111" record2: a="125" /> <row UNIQUEID="5660101" a="165" /> and i can't seem to figure out how to combine the records together in a streaming way (i know i can just collect the complete xml by appending them to a StringBuffer, but that might get realy realy big) ...

Go Back   Application Development Forum > Framework and Interface Programming > JDBC JAVA

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 10-18-2004, 09:16 PM
clogwog
Guest
 
Default streaming "for xml" to sax xslt-transformation

hello,

i'm wondering if anybody can point me to an example how to stream the
resultset (containing XML) to a SAXParser ? the query gets returned
with: "FOR XML RAW" so the xml is broken up into multiple records.

for example:

record1:
<row UNIQUEID="53380601" a="53" /> (.... heaps more of these records
....)<row UNIQUEID="5311111"

record2:
a="125" /> <row UNIQUEID="5660101" a="165" />

and i can't seem to figure out how to combine the records together in
a streaming way (i know i can just collect the complete xml by
appending them to a StringBuffer, but that might get realy realy big)

any idea's are very welcome.
regards,
tom
Reply With Quote
  #2  
Old 10-28-2004, 03:52 AM
Mikhail Danilov
Guest
 
Default Re: streaming "for xml" to sax xslt-transformation

clogwog wrote:

> hello,
>
> i'm wondering if anybody can point me to an example how to stream the
> resultset (containing XML) to a SAXParser ? the query gets returned
> with: "FOR XML RAW" so the xml is broken up into multiple records.


Hello,
You can use ByteArrayStream.
For example, you receive at the start the total lenght of data, after this
you store received data in byte array. Then all data is received you can
create ByteArrayStream and translate it to SAXParser...

Regards, Michael

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 04:59 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.