I know how to insert an XML file into a database Clob column, but I have an XML Document object. How do I convert the Document object into a String, or character array or something else useful so that I can insert it into a Clob? We are using Oracle 8i along with the Apache Xerces parser and JAXP. Thanks for the help Brian
Brian To convert a doc to string, loop through the doc and convert individual node to string. //Convert an XML string to a real string public static String xmlToString(Node _node) { Node value = _node.getFirstChild(); if(value == null) { return ""; } return value.getNodeValue(); } For your second question, I recommend to create an java object and convert the xml to java object. You can then access java object fields when persisting your data to the table