How to read xml column from db2 using jdbc
问题 Let us say I have a table called ABC with 2 columns id(number), content(xml) in DB2. String q="select * from ABC where id=121"; Connection conn = getConnection(dbUrl,schemaName,userName,password); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(q); while(rs.next()) { //HERE HOW CAN I GET CONTENT COLUMN VALUE IN STRING FORMAT } I have tried rs.getObject(i), rs.getString(i) and rs.getSQLXML(i).getString() but no luck... And I need only db2 solution I have fixed my self