Home
TeamSite
Xpath error-Handler couldn't resolve external entity
Amit_LnT
Hi,
I am trying to use a XML::Xpath with the DCR XML. But, it throws following error.
501 Protocol scheme 'y' is not supported y:/.../dcr4.5.dtd.
Handler couldn't resolve external entity at line 2, column 36, byte 75
error in processing external entity reference at line 2, column 36, byte 75
I do not have any idea about this protocol scheme error. I found that, this comes if a wrong/invalid URL is given. I also tried giving explicit location of the dtd file, but still same result.
If anyone can throw some light on it, will be appreciated.
Snippet of the XML:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE record SYSTEM "dcr4.5.dtd">
<record name="TrusteeForm" type="content">
<item name="id_content">
.
.
Env: TS 6.5 SP2 on windows server 2003.
Perl: 5.8.2
Thanks,
Amit
Find more posts tagged with
Comments
sanoboy
hi,what file are you creating with the DCR xml?
Jamik
You're getting this error because XPath expects a URL, something using the http protocal (
http://www.mydomain.com/path/to/xml)
. What you're trying to do is use file system protocal when you're specifying the Y drive and Xpath does not understand that protocol as the error states. So if you want to use Xpath you need to be using URLs to files and not file system paths. If you want to use file system paths I would say maybe take a look at perl's XML DOM api and see if that does what you're looking for.
Also for future reference it would be better to post your actual code that is throwing the errors in question.