Peter Eisentraut-2 wrote
> On 5/29/14, 11:59 AM, Bob Moyers wrote:
>> When I try this update:
>>
>> UPDATE REPORT_STYLE SET JASPER_STYLE = XMLPARSE(DOCUMENT ?) WHERE
>> (REPORT_STYLE_NAME = ?)
>>
>>
>>
>> I get:
>>
>> org.postgresql.util.PSQLException: ERROR: invalid XML content
>>
>> Detail: line 2: StartTag: invalid element name
>>
>> <!DOCTYPE jasperTemplate PUBLIC "-//JasperReports//DTD
>> Template//EN"
> > "http://jas
>
> This could be a problem with the JDBC driver's handling of xmlparse.
> Maybe you could help some debugging help on their mailing list. Also
> check the server log. Maybe you can see there what the server actually
> received.
So I tested a "SELECT XMLPARSE(DOCUMENT ?)" query using the 9.0-801 driver
against a 9.0 server and did not encounter the parsing error described.
It would help to show the actual Java code you are using, especially the
parameter setValue calls, as I am guessing that the unknown typed first
parameter is being immediately cast to "xml" - before being fed to XMLPARSE.
If that is the case then the server's default of CONTENT would be in effect
and you would get the error in question. You must ensure you pass in a
string for the first parameter.
David J.
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Re-PostgreSQL-9-3-XML-parser-seems-not-to-recognize-the-DOCTYPE-element-in-XML-files-tp5805492p5806063.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.