XML::Twig is a nice Perl module to process XML the Perl way. It was quite easy to install, using ppm under Microsoft Windows XP and easy to get up and running.
I also use the Image::Size Perl module in the Perl program that is used to generate this blog in order to obtain the width and height of images. Hence I don't have to enter the image dimensions manually in my XML MexIT files but let the software figure it out.