-
Hi Friends,
I was wondering how efficient it will be to serialize XML Document(doc) as follows to store in java.sql.Clob:
(This code works fine )
//Convert XMLdoc to char array using serializer
CharArrayWriter chwriter = new CharArrayWriter() ;
XMLSerializer xs = new XMLSerializer() ;
xs.setOutputCharStream(chwriter);
xs.serialize(doc);
char[] ca =chwriter.toCharArray();
//write to Oracle clob
java.io.Writer wr = clob.getCharacterOutputStream();
wr.write(ca);
wr.flush();
wr.close();
chwriter.flush();
chwriter.close();
db_conn.commit();
db_conn.close();
Thanks
Kiran
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|