Slow to convert Oracle 11g XMLType into Java String or Document

瘦欲@ 提交于 2019-12-11 13:59:45

问题


After retrieving a result set from an Oracle 11g database, it takes roughly 75 seconds to convert the XMLType (this is a structured XML Storage, registered with an xsd) into either a java String or Document. I'm using Java 1.6, have the xdb.jar and xmlparserv2.jar

This xsd is <100 lines and the xml document is also <100 lines.

Sample code:

oracle.xdb.XMLType xml = oracle.xdb.XMLType.createXML((oracle.sql.OPAQUE)rset.getObject("XMLDATA"));

The other way, but still took just as long:

XMLType xml = (XMLType)rset.getObject("XMLDATA");
xml.getStringVal();

Or

XMLType xml = (XMLType)rset.getObject("XMLDATA");
org.w3c.dom.Document doc = xml.getDocument();

Either way of the above ways takes just as long.

来源:https://stackoverflow.com/questions/3152845/slow-to-convert-oracle-11g-xmltype-into-java-string-or-document

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!