busting-out XML sections

Thomas Gagne tgagne at ix.netcom.com
Sat Oct 7 00:51:14 EDT 2000


Alex Martelli wrote:

> <snip>
> I think it's wrong to assume that the implementation of crucial
> infrastructure
> such as XML DOM analysis is defective, just because it *might* be and thus
> cause problems if you ever have to process a gigabyte-size input file.  Why
> not "do the simplest thing you can possibly get away with", as XP teaches?

I'm curious, in this example, what the simplest thing would be?  I've been
reading the XP debates in comp.object at arm's-length and decided on something
that is fairly straight-forward, but avoids consuming memory (attached).
Briefly, the first argument is the tag inclosing the text I want to 'burst'
from the rest of the file (hence the name, burster.py).  And it even avoids
being a poor computer citizen.  Line-for-line I'd imagine it's pretty
low-maintenance.

Out of curiosity, is part of what XP is about?  Doing the simplest thing
first?  Heck, I'm always looking for the simplest way to get something done (I
think I even lead-off the first message in that thread complaining that I
didn't want to do anything too complicated--or maybe I'm just lazy?

>
> Using an XML DOM approach is often simplest.  Use it, and see if you can't
> get away with it.  If and when the XML DOM implementation you have proves
> defective, upgrade to a better one, and, *poof*, problem disappears again...
>
> Alex

--
.tom






More information about the Python-list mailing list