I have a table in Postgresql
DROP TABLE xml_docs;
CREATE TABLE xml_docs(
id serial PRIMARY KEY,
cad_number character(50),
gkuzu_name character(50),
gkuzu xm
I'm not sure, but try this:
First convert your XML to a Java String. Then create an insert statement und use the XMLPARSE method of PostgreSQL to convert your value to the xml type of PostgreSQL:
INSERT INTO xml_docs(id, gkuzu) VALUES (1, XMLPARSE('Hello '));
See: http://wiki.postgresql.org/wiki/XML_Support
UPDATE:
Java code example:
String sql = "INSERT INTO xml_docs(id, gkuzu) VALUES (?, XMLPARSE(?))";
[...]
stmt.setString(2, "Hello World! ");
This should create this statement:
INSERT INTO xml_docs(id, gkuzu) VALUES (1, XMLPARSE('Hello World! '));