Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
my $namespace = shift;
my $type = shift;
my $subclass = __PACKAGE__ . "::" . $type;
- my $self = bless { type => $type, namspace => $namespace }, $subclass;
+ my $self = bless { type => $type, namespace => $namespace }, $subclass;
return $self;
}
my $self = shift;
my $xmldoc = shift;
if ($xmldoc) {
+ # Given our xml document, lets find the itemid
my ($item_id) =
- $xmldoc->getElementsByTagNameNS( $self->namespace(), 'ItemId' );
- my $item = NCIP::Item->new( { itemid => $item_id } );
+ $xmldoc->getElementsByTagNameNS( $self->namespace(),
+ 'ItemIdentifierValue' );
+ my $item = NCIP::Item->new( { itemid => $item_id->textContent() } );
+ warn $item->itemid();
}
return $self->type;
}