http://www.perlmonks.org?node_id=1084206


in reply to Re^3: Perl XML::Smart Out of memory! error
in thread Perl XML::Smart Out of memory! error

Hi many thanks for the code. i ran it on the full file and it showed up an error while processing. Can't call method "att" on an undefined value at import_icecat.pl line 107. line 107 is
$f[3] = $elt->first_child('Description[@langid="1"]')->att('Value');
looking at the xml i find that there is block with missing attributes.It has the opening and closing Category tag but not discription.How do i get it to ignore where tags are missing and keep processing
<Category ID="1" LowPic="" Score="0" Searchable="0" ThumbPic="" UNCA +TID="" Visible="0"> <Name ID="0" Value="" langid="1"/> <ParentCategory ID="1"/> </Category>