use XML::Xpath::Extract; my $extractor = XML::Xpath::Extract->new( xsd => ['fileA.xsd','fileB.xsd'] ); my $xpaths = $extractor->extract;