[XML-SIG] re: events for DTDs?
Thu, 22 Jun 2000 13:13:42 -0500
Greg Wilson wrote:
> I'm preparing material based on SAX-1 to use in a course I'll be teaching
> later this summer.
SAX 1 doesn't have support for that stuff. SAX 2, yes.
> The first exercise is to build something that echoes
> the contents of an XML file, and in order to do this correctly,
Believe it or not, exactly echoing the contents of any old XML file is
one of the hardest things to do with XML parsers. Part of an XML
parser's job is to *simplify* the data and only present you with the
parts that are "important" according to the parser programmer's
definition of important. Even SAX 2 will not be quite sufficient.
If all you want to echo is the basic logical structure, you are good to
go, but if you want the whole kit and kaboodle, you'll have to use a
proprietary API (actually, the open groves API can do it for you, but I
think that the only sufficiently rich implementation (for Python or any
language) is commercial!).
Paul Prescod - ISOGEN Consulting Engineer speaking for himself
"So there you have it folks, the Millenium: warring and whoring but
never boring." - Dennis Miller