From 4d5b2a4ced01885a6b674d6a2806680a54b3ca11 Mon Sep 17 00:00:00 2001 From: tipaul Date: Tue, 10 Jan 2006 17:01:29 +0000 Subject: [PATCH] adding a XMLgetbiblio in Biblio.pm (1st draft, to use with zebra) --- C4/Biblio.pm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index e221fde3cc..ccc7553fbb 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -66,6 +66,7 @@ $VERSION = 0.01; &MARCkoha2marcBiblio &MARCmarc2koha &MARCkoha2marcItem &MARChtml2marc &MARCgetbiblio &MARCgetitem + &XMLgetbiblio &char_decode &FindDuplicate @@ -284,6 +285,26 @@ sub MARCgetbiblio { return $record; } +=head2 $XML = &XMLgetbiblio($dbh,$biblionumber); + +=over 4 + +Returns a raw XML for the biblio $biblionumber. + +=cut + +sub XMLgetbiblio { + + # Returns MARC::Record of the biblio passed in parameter. + my ( $dbh, $biblionumber ) = @_; + my $sth = $dbh->prepare('select marcxml,marc from biblioitems where biblionumber=?'); + $sth->execute($biblionumber); + my ($XML,$marc) = $sth->fetchrow; +# my $record =MARC::Record::new_from_usmarc($marc); +# warn "MARC : \n*-************************\n".$record->as_xml."\n*-************************\n"; + return $XML; +} + =head2 $MARCrecord = &MARCgetitem($dbh,$biblionumber); =over 4 @@ -2885,6 +2906,9 @@ Paul POULAIN paul.poulain@free.fr # $Id$ # $Log$ +# Revision 1.136 2006/01/10 17:01:29 tipaul +# adding a XMLgetbiblio in Biblio.pm (1st draft, to use with zebra) +# # Revision 1.135 2006/01/06 16:39:37 tipaul # synch'ing head and rel_2_2 (from 2.2.5, including npl templates) # Seems not to break too many things, but i'm probably wrong here. -- 2.39.5