in reply to Open a zip file content question!

Well, membersMatching only returns filenames
my @xml = $zip->membersMatching( '.*\.XML' ); my $xmlfile = XML::XPath->new(ioref => @xml);
And ioref expects filehandles

You have to give the functions what they want :)

Replies are listed 'Best First'.
Re^2: Open a zip file content question!
by Anonymous Monk on Mar 04, 2011 at 03:03 UTC
    Yes, and that's where I am stuck, any code I can see on how this could be accomplished? Thanks!
      use Archive::Zip::MemberRead; my $xmlfile = XML::XPath->new(ioref => $xml[0]->readFileHandle );
        Almost, but still giving an error:
        my $zipfile = "test.zip"; my $zip = Archive::Zip->new( $zipfile ) || die; my @xml = $zip->membersMatching( '.*\.XML' ); my $xmlfile = XML::XPath->new(ioref => $xml[0]->readFileHandle ); #error: not well-formed (invalid token) at line 1, column 24, byte 24: Archive::Zip::MemberRead=HASH(0x2063604) =======================^