Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

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?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2016-10-23 08:02 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (300 votes). Check out past polls.