|
|
| laziness, impatience, and hubris | |
| PerlMonks |
Re^3: XML Parsingby tmharish (Friar) |
| on Jan 31, 2013 at 14:12 UTC ( #1016325=note: print w/ replies, xml ) | Need Help?? |
|
Quite simply $hash_when_cat_eq_special is a pointer to a hash. So you can do your normal hash operations on it. The ->pointer() function returns this for you. In terms of the foreach:
The advantage here is that $xml_obj, $xml_obj->{list} ... are all Objects of type XML::Smart and can always be used as either a hash OR an array. To extract your data you can simply use the 'pointer' function ( $xml_smart_obj->pointer() )that will return the hash structure or the 'content' function ( $xml_smart_obj->content() ) that will return the contents of a node.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||