XML::RAX - Record-oriented API for XML
use XML::RAX; my $R = new XML::RAX();
# open from XML data $R->open( '<Table><Record><ID>1</ID><Phone>555-5555</Phone></Record></Table>' ); $R->setRecord('Record');
# open XML from file $R->openfile( 'test.xml' ); $R->setRecord('Record');
# iterate through recordset my $rec = $R->readRecord(); while ( $rec ) { print "Phone = ".$rec->getField('Phone')."\n"; $rec = $R->readRecord(); }
This interface allows you to access an XML document as you would a database recordset. In instances where the XML document fits a record/field type format, using the RAX interface will usually be simpler than using DOM or SAX to access the data.
XML::RAX requires XML::Parser.
See Sean McGrath's article on RAX for an good overview of RAX: http://www.xml.com/pub/2000/04/26/rax/index.html
Robert Hanson
The RAX API was created by Sean McGrath and first introduced in his article on XML.com.
Copyright (c) 2000 Robert Hanson. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install XML::RAX, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XML::RAX
CPAN shell
perl -MCPAN -e shell install XML::RAX
For more information on module installation, please visit the detailed CPAN module installation guide.