Hi there,
I am trying to put an instance of java.util.Properties into a XML column of Sql Server using a
JDBC PreparedStatement.
I defined a table containing a XML column based on a schema called properties.xsd. The latter is generated from
http://java.sun.com/dtd/properties.dtd
When I try to execute my code I am getting this exception:
com.microsoft.sqlserver.jdbc.SQLServerException: Parsing XML with internal subset DTDs not allowed. Use CONVERT with style option 2 to enable limited internal subset DTD support.
Here's my code:
When properties.storeToXML is executed, it sends this XML content to the given outputstream:
As I described before I generated properties.xsd based on
http://java.sun.com/dtd/properties.dtd and then I defined the table as follows:
properties.xsd Looks like this:
Does anybody know how to solve this, or should I perhaps try to remove the DTD line from the XML content?
Thanks,
Kjeld