Beefy Boxes and Bandwidth Generously Provided by pair Networks chromatic writing perl on a camel
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Trying to use XML::Smart: How do I get the attribute names of an XML element using XML::Smart?

by ickyb0d (Monk)
on Nov 02, 2005 at 17:10 UTC ( [id://505137]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Trying to use XML::Smart: How do I get the attribute names of an XML element using XML::Smart?

I don't really have any experience using the module... but...

Based on looking at the documentation

You can get the list of values of an attribute looking in all multiple nodes:

## Get all the server types: my @types = $XML->{server}('[@]','type') ;

Further down it cites

my @names = $this->{method}{wxFrame}{arg}{name}('<@') ; #### @names = (parent , id , title) ;

It also gives an example

my $name = $XML->{server}{name}->content ;

hope this helps.

  • Comment on Re: Trying to use XML::Smart: How do I get the attribute names of an XML element using XML::Smart?
  • Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://505137]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.