Fun with a pet Python and DOM

Well, I didn’t say that my pet Python is a snake, it is actually a scripting language. Very nice language! It has great libraries, very powerful built-in data types, awesome syntax structure. And the best part is that it can be learned in very few days. I did not take much time too.

I always wanted to handle data in the form of XML. Two days ago, I found a ebook on Python and XML. I tried that out. The first part was on SAX (Simple API for XML). I found SAX’s working very difficult. Then I went to DOM (Document Object Model), and found it very intuitive, and a breeze to use. The online resources say that SAX is good for large data handling, and DOM is better for complex XML files. I don’t know about SAX, so I cannot give you my opinion about SAX. But the experience with DOM was great. It was fun; only in two evenings, I can read and write XML with DOM easily. At first, XML handling appeared to be very complex stuff while I started off with SAX, all those extension classes, objects, call backs, really it was a bit difficult at first glance. Now I think I should move to some more complex programming, like SAX, web programming with Python maybe, JavaScript and AJAX.

My plan at first to was to build a local .rpm repository designer for Fedora, for I badly needed that. I will be building that soon, as I now know bit of PyGTK and bit of DOM, it won’t be much difficult. But, I don’t really use Fedora now, so…

My friends ask me why I keep sitting at the front of my computer all the time, trying to programme some job, or hacking my ubuntu to do something, or writing some shell script. I cannot reply them. It’s just plain fun!

Advertisements

One comment on “Fun with a pet Python and DOM

  1. jimmyzhang says:

    you may also want to check out vtd-xml, the latest and most advanced xml processing model

    vtd-xml

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s