0

In my case,

INSERT INTO xmltable (id, xml_content) 
VALUES (?,XMLPARSE(DOCUMENT '<?xml version=\"1.0\" encoding=\"UTF-8\"?><mail><from>abc</from><to>xyz</to></mail>' PRESERVE WHITESPACE))

is working fine, but

INSERT INTO xmltable (id, xml_content) 
VALUES (?,XMLPARSE(DOCUMENT ? PRESERVE WHITESPACE)) 

is not.

Vamsi Prabhala
  • 48,685
  • 4
  • 36
  • 58
  • What does the calling code look like? – Alex Sep 16 '15 at 15:38
  • Which RDBMS is this for? Please add a tag to specify whether you're using `mysql`, `postgresql`, `sql-server`, `oracle` or `db2` - or something e – marc_s Sep 16 '15 at 19:40
  • Currently I am using Derby but in future I will use DB2 – Yogendra Pant Sep 16 '15 at 20:18
  • My problem is I have to use format XMLPARSE(DOCUMENT ' ? ' PRESERVE WHITESPACE) where ? will be replaced by a string having xml content. I tried putting xml string inside single quotes (' ') that did not work – Yogendra Pant Sep 16 '15 at 20:23

0 Answers0