"Brian Quinlan" <[EMAIL PROTECTED]> ha scritto nel messaggio
news:[EMAIL PROTECTED]
> Hey,
>
> I'm trying to figure out how I can validate an XML file using a DTD that
> isn't specified in the XML file.

I did it once using lxml. You can read from:
http://codespeak.net/lxml/validation.html

With this package is quite simple (code not tested):

from lxml import etree
dtd = etree.DTD('mydtd.dtd')
f = file('mydoc.xml')
xml = etree.XML(f.read())
dtd.validate(xml)

Enrico


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to