Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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 imbibing at the Monastery: (9)
As of 2016-09-28 08:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (523 votes). Check out past polls.