Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Parse handler for Attributes in XML

by tangent (Curate)
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};


Comment on Re: Parse handler for Attributes in XML
Select or Download Code
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 browsing the Monastery: (9)
As of 2015-07-04 15:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls