[XML-SIG] DOM API
Fred L. Drake
Fred L. Drake, Jr." <firstname.lastname@example.org
Tue, 20 Apr 1999 08:58:10 -0400 (EDT)
Greg Stein writes:
> an XML document. For all practical purposes, it is nearly useless. (again:
> IMO) ... I mean hey: does anybody actually use the DOM to *generate* XML?
> Screw that -- I use "print". I can't imagine generating XML using the DOM.
Perhaps I missed some context. I use the DOM to edit structured
data; the input is essentially LaTeX, and the output is SGML/XML. I
perform fairly large, structured edits before writing the data back
I agree the DOM would be painful for generating a small amount of
XML from a source structured very differently from the output, but my
application leads me to believe that though the DOM is fairly tedious,
it gives me the ability to control the output in ways that support my
nit-picky approach to documents.
Don't get me wrong: I'm sure a substantially better API could be
designed, especially if it wasn't intended to translate cleanly (or at
all) to languages other than Python. But I don't have time or
interest in that; the DOM works well enough in it's absense.
Fred L. Drake, Jr. <email@example.com>
Corporation for National Research Initiatives