Python & XML & DTD (warning: noob attack!)

Kevin Ballard kevin at sb.org
Thu Jan 29 19:42:47 CET 2004


On 2004-01-29 07:04:44 -0500, Igor Fedorow <igor.NOSPAM at obda.net> said:

> I tried xml.dom.ext.PrettyPrint, but it produces only
> 
> 	<?xml version='1.0' encoding='UTF-8'?>
> 	<!DOCTYPE root>
> 	<root>
> 	   ...
> 	</root>
> 
> actually lacking the document type definition.

Why not simply use that, then replace the <!DOCTYPE root> with the DTD? I'm 
sure you can parse it out from the original file.

--
"Remember, no matter where you go, there you are."
                                 -Buckaroo Banzai
Kevin Ballard
http://kevin.sb.org



More information about the Python-list mailing list