[Tutor] XML

Lockhart, Luke LockhartL at Ripon.EDU
Thu Dec 20 22:28:47 CET 2007



Hello all,

Sorry if this is a double post, I had some technical problems with subscribing to this list.

So I'm a very novice Python programmer. I've done stuff up to the intermediate level in Microsoft flavors of BASIC and C++, but now I'm a Linux man and trying to realize my overly ambitious programming dreams with Python, mainly because I have friends who use it and because it has libraries that in general are very good at doing what I want to do.

Now, the program I'm working on would hypothetically store and read all data as XML, and yes I'm aware of the performance drawbacks and I'm willing to live with them. But I just can't figure out the various libraries that Python uses to read XML, and my friend's code doesn't help much.

Basically, what I really would like to do, without going into a lot of detail, is be able to read various tags into classes and arrays until the entire file has been read, then remove the file from memory. I first tried to use the basic Python XML libraries, and then my friend recommended SAX - but so far as I can tell, either method requires numerous lines of code to support one new tag. Is this what I'm going to have to do, or is there a simpler way?

Thanks in advance,
Luke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20071220/f83a2421/attachment.htm 


More information about the Tutor mailing list