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

Re: Parse handler for Attributes in XML

by tangent (Priest)
on Apr 10, 2012 at 10:13 UTC ( #964302=note: print w/ replies, xml ) Need Help??


in reply to Parse handler for Attributes in XML

All the attributes are in the hash %attrs:
for my $attr (keys %attrs) { if ($attr eq 'command') { print "Command: $attrs{$attr}\n"; } }
To access a specific attribute (e.g. command) just say:
my $command = $attrs{command};

Replies are listed 'Best First'.
Re^2: Parse handler for Attributes in XML
by balajinagaraju (Sexton) on Apr 10, 2012 at 10:24 UTC
    Thanks a lot Tangent, your piece of advice worked well. I still have some specifics to handle will come back incase i am not able to get it myself:-). Thanks for your time.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://964302]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2016-06-27 03:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (335 votes). Check out past polls.