[XML-SIG] supress DTD reading

Roman Kennke roman at interview-machine.com
Thu Nov 27 03:07:32 EST 2003


Hi there again,

When I'm trying to parse an XML document into DOM, is there a way to tell
the parser, that it may not read an internal or external DTD?
Nevertheless, I would like to have it mentioned in Document.doctype, so I
can see, _that_ there is a DTD(-reference). How to do that?
(When I try this with xml.dom.reader.Sax2.Reader with the following XML doc:

<?xml version='1.0' ?>
<!DOCTYPE env:Envelope SYSTEM "env.dtd"[]>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
  <env:Body>
    <test:echoOk xmlns:test="http://example.org/ts-tests">
      foo
    </test:echoOk>
 </env:Body>
</env:Envelope>

I get an exception:

ValueError: unknown url type: env.dtd


Roman




More information about the XML-SIG mailing list