value error when parsing XML

A

Ajay Brar

hi!

i get a value error when parsing an xml file. This is because it can't
find the DTD -
ValueError: unknown url type: ../um_xml/um.dtd

From what i have discovered in the archives, this happens when your XML
and DTD file are not in your current directory
i have the directory structure
home
user - this is where i am running the script from
um_xml- this is where the xml and dtd are

can someone please tell me how i can workaround this problem. the script
executes fine when the xml and dtd files are in user/. But i don't
really want to put them there.
any ideas?

thanks

cheers
 
D

Diez B. Roggisch

Ajay said:
can someone please tell me how i can workaround this problem. the script
executes fine when the xml and dtd files are in user/. But i don't
really want to put them there.
any ideas?


Since you didn't say how you actually access your document - sax or dom - I
can't give you a definite answer. But for sax, try an entityresolver. For
dom, I've no idea, but I bet there is a solution, too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top