package PubMed::Xml; use Carp; use XML::LibXML; use PubMed::Paths; my $xpc = XML::LibXML::XPathContext->new(); #$xpc->registerNs('amf',$Ernad::Constant::c->{'amf_ns'}); #$xpc->registerNs('ernad',$Ernad::Constant::c->{'ernad_ns'}); #$xpc->registerNs('e',$Ernad::Constant::c->{'ernad_ns'}); # return $xpc; sub check_xml_file { my $file=shift // ''; if(not $file) { confess "I need a file argument here."; } if(not -f $file) { confess "I can't see the file $file"; } my $s=$PubMed::Paths::xmlwf. " $file"; my $out=`$s`; if($out=~m|^\s*$|) { return 1; } return 0; }