From 17f4a9e77ea42e7a86e7de7b4bbcdad55b30bed1 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Thu, 9 Oct 2008 17:53:40 +0000 Subject: [PATCH] extra fields --- unicorn_patron_xml2text.pl | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/unicorn_patron_xml2text.pl b/unicorn_patron_xml2text.pl index 5328d57..eeb21c7 100755 --- a/unicorn_patron_xml2text.pl +++ b/unicorn_patron_xml2text.pl @@ -34,8 +34,12 @@ my @base_elements = ( "user_category1", "user_category2", "user_category3", + "user_category4", "dept", "guardian", + "aup", + "photo", + "notify_via", "user_claims_ret", #"user_environment", #"user_library", @@ -52,10 +56,12 @@ my @addr_elements = ( "dayphone", "homephone", "workphone", + "cellphone", "email", "location", "usefor", - "care_of" + "care_of", + "known_bad" ); print STDOUT join("\t", @base_elements); @@ -100,7 +106,12 @@ for my $patron ( $doc->documentElement->childNodes ) { foreach my $t ( 1..3 ) { if ($addresses{$t}) { foreach my $e ( @addr_elements ) { - my $v = $addresses{$t}->findvalue( $e ); $v =~ s/^\s+//; $v =~ s/\s+$//; + my $v; + if ($e eq "known_bad") { + $v = $addresses{$t}->getAttribute( $e ); $v =~ s/^\s+//; $v =~ s/\s+$//; + } else { + $v = $addresses{$t}->findvalue( $e ); $v =~ s/^\s+//; $v =~ s/\s+$//; + } print STDOUT ( $v ? $v : '' ) . "\t"; } } else { -- 1.7.2.5