value error when parsing XML

Discussion in 'Python' started by Ajay Brar, Jul 31, 2004.

  1. Ajay Brar

    Ajay Brar Guest

    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

    --
    Ajay Brar
    Ajay Brar, Jul 31, 2004
    #1
    1. Advertising

  2. Ajay Brar wrote:

    > 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.

    --
    Regards,

    Diez B. Roggisch
    Diez B. Roggisch, Jul 31, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Nilsen
    Replies:
    1
    Views:
    406
    Tobias Schierge
    Jan 25, 2004
  2. John Levine
    Replies:
    0
    Views:
    711
    John Levine
    Feb 2, 2012
  3. Erik Wasser
    Replies:
    5
    Views:
    417
    Peter J. Holzer
    Mar 5, 2006
  4. P
    Replies:
    7
    Views:
    126
    Tad McClellan
    Jan 12, 2007
  5. Larry Wilson

    parsing RSS XML feed for item value

    Larry Wilson, Nov 20, 2013, in forum: Python
    Replies:
    5
    Views:
    106
    Larry Wilson
    Nov 20, 2013
Loading...

Share This Page