in reply to XML::Smart 1.2 released: Unicode, Entities, Binary data & CDATA
my $addr1 = $XML->{server}('type','eq','suse'){address}[1] ;
If you used Class::XPath in XML::Smart this could be written:
my ($addr1) = $XML->match('/server[@type="suse"]/address[1]');
It may not be shorter, but for people that know XPath it might be easier.
-sam
|
|---|