Robert Hanson


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:


Robert Hanson


The RAX API was created by Sean McGrath and first introduced in his article on


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.