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
An update to the accepted answer if you do not have Postgres built with libxml support:
Java code example:
String sql = "INSERT INTO xml_docs(id, gkuzu) VALUES (?, XML(?))";
[...]
stmt.setString(2, "Hello World! ");
This should create this statement:
INSERT INTO xml_docs(id, gkuzu) VALUES (1, XML('Hello World! '));
Thus for version 9.0 and greater you may want to switch XMLPARSE
==> XML
. Otherwise you will need special support for XMLPARSE
From Postgres Documentation:
The function-like expressions xmlparse and xmlserialize for converting to and from type xml are not repeated here. Use of most of these functions requires the installation to have been built with configure --with-libxml.