cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error on XML Parser when referencing external DTD

Former Member
0 Likes
1,379

Hi,

I was trying to replicate some examples I found on the "XML Services" guide. In particular, I'm having troubles to make the parser download an external DTD definition. According to the manual "There are no restrictions on the use of URIs as href attributes or document text, and XML Services resolves external reference URIs that specify http URIs."

But when I execute this query:

insert into text_docs values (xmlvalidate('<!DOCTYPE emp_name PUBLIC "prueba" "http://xx.xx.xx.xx/dtd_emp.dtd"><emp_name>John Doe</emp_name>',option 'dtdvalidate=yes'))

I get this exception:

XMLVALIDATE(): XML parser fatal error <<An exception occurred!

Type:NetAccessorException, Message:Could not create the socket for URL '{0}'.

Error={1}>> at line 1, offset 71.

Using google I found people who got the same error, but I haven't found any solution.

Any help would be appreciated

Thanks

Leandro

View Entire Topic
Former Member
0 Likes

Well.   http://xx.xx.xx.xx is not a valid URL.  It looks more like an example template.  Are you using an actual IP address?

Former Member
0 Likes

Yes, of course, I'm using a valid IP Address and a valid DTD (I just replaced my public ip with xx.xx.xx.xx for security reasons).

Also I've checked permissions and firewall rules.

Former Member
0 Likes

I can get the following to work:

insert into text_docs values (xmlvalidate('<!DOCTYPE emp_name PUBLIC "http://xx.xx.xx.xx/dtd_emp.dtd"><emp_name>John Doe</emp_name>'

,option 'dtdvalidate=yes xmlerror=null'))

can further use any option for xmlerror=[null|message|exception]