in reply to Re: Re: Re: Parsing XML into a Hash
in thread Parsing XML into a Hash
"So what's wrong with that?"
Murphy will rear 'is ugly and head and next thing you know the XML will need be nested:and attributes will be needed:... <name> <first_name>Foo</first_name> <last_name>Bar</last_name> </name> ...
.. and more goodies waiting around the corner for anyone trying to write a parser that has never written any kind of compiler. I personally do not like to waste valuable time reinventing a wheel that only takes a few moments to install. You download it, you install it, you write stuff that matters and you don't worry about the issues i pointed out.... <name part="first">John</name> <name part="last">Smith</name> ...
But .... IF and if that XML will never get more complicated that originally posted, then your code should suffice. However, a "real" XML parser does not 10 lines of code make, just take a look at XML::SAX::PurePerl. ;)
UPDATE:jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Parsing XML into a Hash
by graff (Chancellor) on Nov 04, 2003 at 04:45 UTC | |
by mcogan1966 (Monk) on Nov 04, 2003 at 12:53 UTC |