[XML-SIG] SGML to DOM?

Jeff.Johnson@icn.siemens.com Jeff.Johnson@icn.siemens.com
Tue, 1 Dec 1998 11:05:41 -0500


I sure hope this is a stupid question with an easy answer...

I have a large SGML document that I am converting to HTML and another SGML
DTD.  For my prototype, I opened the document in ArborText's Adept SGML
editor and saved it as XML.  This made it well formed and escaped some '<'
and '>' characters that were not markup.  Unfortunately, it took the line
feeds out of some pre-formatted text.

I figured that was not a problem because I wanted to have Python read in
the native SGML anyway.  Then I briefly read the sgmllib docs; the part
about it not supporting full SGML, just whatever HTML needs.

Could someone tell me if there is a way to read in a non-well formed SGML
document, with preformatted text into a DOM tree?

Thanks in advance,
Jeff