Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: map to hash with replacement

by Your Mother (Chancellor)
on Feb 05, 2010 at 02:22 UTC ( #821488=note: print w/replies, xml ) Need Help??


in reply to Re: map <IF> to hash with replacement
in thread map <IF> to hash with replacement

I understand this is well intentioned but I think it's bad advice. XML::Twig, XML::Rules, and XML::LibXML are probably all to be preferred over XML::Parser; I'd argue the libxml wrapper is definitely a better choice. And XML::Simple is anything but; it's a maze of special cases and their mapping parameters. It can be a very useful module but I wouldn't recommend it without knowing the problem and input at hand.

  • Comment on Re^2: map <IF> to hash with replacement

Replies are listed 'Best First'.
Re^3: map <IF> to hash with replacement
by mrdvt92 (Acolyte) on Feb 05, 2010 at 04:34 UTC
    I would use XML::Simple. It's dead easy to bring XML in as Perl structures.
    use XML::Simple qw{XMLin}; print keys %{XMLin("<root><x>1</x><y>2</y></root>")};
    This prints "xy".

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://821488]
help
Chatterbox?
[LanX]: Station Palace
[Eily]: yay well the one in Nancy is ... hu, a station?
[LanX]: no wonder he prefers to walk ..
[erix]: heh

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (12)
As of 2017-12-13 16:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (369 votes). Check out past polls.

    Notices?