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