开发者

rails support for xmlparse(DOCUMENT, xml string)

开发者 https://www.devze.com 2023-02-01 07:18 出处:网络
I\'m not able to insert data to a field of type xml. looks like I Need to call XMLPARSE(DOCUMENT...) instead of just passing the string through.

I'm not able to insert data to a field of type xml.

looks like I Need to call XMLPARSE(DOCUMENT...) instead of just passing the string through.

e.g. XMLPARSE (DOCUMENT 'Manual...')

Anybody know how to get this working in Rails?

Here's the error message I get when i attempt the insert.

PGError: ERROR: invalid XML content 开发者_如何学JAVALINE 1: ...2010, NULL, NULL, NULL, NULL, NULL, 2, 'new', xml '


You don't necessarily need to use XMLPARSE. From the error message, it rather looks like you might have quoting problem in the surrounding code, because that looks like the INSERT statement itself being passed in as XML value.

0

精彩评论

暂无评论...
验证码 换一张
取 消