in reply to Getting started with XML

Perhaps XML::Trivial could help you, though it is read only representation of XML document. This module parses documents exactly, and then you can go through and output whatever you need.