Examples of SGML parsing with a DTD in Python

Lars Marius Garshol larsga at garshol.priv.no
Mon Nov 4 05:39:42 EST 2002


* Ilya Shambat
| 
| Does anyone have any examples of parsing SGML code with a DTD in
| Python, whether through sgmllib or through nsgmls? I have read the
| documentation on both, but neither seem to address the issue of
| parsing SGML code with DTD. Does anyone have any examples of how this
| is done?

nsgmls uses the DTD, but sgmllib does not. If you want to use nsgmls
from Python you can either parse the ESIS output from nsgmls, or you
can use pysp:
  <URL: http://www.garshol.priv.no/download/software/pysp/ >

-- 
Lars Marius Garshol, Ontopian         <URL: http://www.ontopia.net >
ISO SC34/WG3, OASIS GeoLang TC        <URL: http://www.garshol.priv.no >



More information about the Python-list mailing list