gvinu4u has asked for the wisdom of the Perl Monks concerning the following question:
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: XML Parsing
by toolic (Bishop) on Sep 21, 2012 at 12:58 UTC | |
Therefore, I will only offer the general advice to use an XML parser. I have been happy with XML::Twig. It has a tutorial, and there are many code examples here at the Monastery (and elsewhere). | [reply] |
Re: XML Parsing
by tobyink (Canon) on Sep 21, 2012 at 14:18 UTC | |
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
| [reply] [d/l] |
by remiah (Hermit) on Sep 22, 2012 at 01:32 UTC | |
With Twig.
| [reply] [d/l] |
Re: XML Parsing
by blue_cowdawg (Monsignor) on Sep 21, 2012 at 13:58 UTC | |
AUUGH! My eyes! :-D My favorite XML parser is XML::Simple. Having said that I tried parsing this with a quick and dirty script and it would seem there is something very wrong with that XML... or it could be me. I attempted to clean up the XML and failed miserably. You might want to review its structure and make sure you have matching closures for all your attributes. Sample error I got:
Peter L. Berghold -- Unix Professional Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg | [reply] [d/l] |
by remiah (Hermit) on Sep 21, 2012 at 23:34 UTC | |
Hello | [reply] |