in reply to Reading attrbiutes of an XPath using XML::XPath module...

The XPATH expression (if your at the root) would be '/doc/a/b/c/@d'. Using XML::LibXML something like this should work:

#!/usr/bin/perl use strict; use warnings; use XML::LibXML; my $xml = <<_XML; <doc> <a> <b> <c d="foo"/> </b> </a> </doc> _XML my $parser = XML::LibXML->new(); my $doc = $parser->parse_string( $xml ); my $val = $doc->findvalue( '/doc/a/b/c/@d' ); print $val, "\n";
But that's only going to work if there's one a, b, and c element. If you think you'll have multiple elements, you'll have to collect them and then iterate the nodes.

-derby