XML, the Perl Way




  perl wtr2_easyobj


This code uses the XML::EasyOBJ manpage to process the invoices

XML::EasyOBJ is built on top of the XML::DOM manpage, and mostly allows for easy navigation by letting you write $invoice= $doc->InvoiceDetails->InvoiceNumber to get the invoice number element, and $invoice->getString to get its value.

The fact that tag names (from the document) are used as method names in the code feels a little weird, and it can make name collision possible (XML::EasyOBJ lets you rename methods though, so you can deal with this problem). It makes it really easy to work with these invoices though, the code was easy to write and

The bad news here is that XML::EasyOBJ mostly helps you accessing the data. If you want to create new elements you have to use the DOM methods.

Overall XML::EasyOBJ feels like a very convenient layer on top of the DOM, which lets you easily navigate and access the data in the DOM (making easy things easy), and lets you use native DOM methods for advanced (making harder things possible).


Michel Rodriguez <mirod@xmltwig.com>


This code is Copyright (c) 2003 Michel Rodriguez. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Comments can be sent to mirod@xmltwig.com



Ways to Rome 2 - Kourallinen Dollareita : http://www.xmltwig.com/article/ways_to_rome_2/