This doesn't empty out the array, it just fills the array with undef values. The array is still the same size as before (i.e. not empty, unless it was already empty).
XML::Simpler does not require XML::Parser or a SAX parser. It does require File::Slurp.
-- grantm, perldoc XML::Simpler