{
my $pkg = shift;
my $class = ref $pkg || $pkg;
- my $self = bless{@_}, $class;
+ my $self = bless{}, $class;
while (@_) {
my $key = shift;
my $val = shift;
$XML::Simple::PREFERRED_PARSER = 'XML::Parser';
import XML::Simple;
$DXProt::handle_xml = 1;
- $xs = new XML::Simple(Cache=>[]);
+ $xs = new XML::Simple(ContentKey=>'content', ForceArray=>1);
}
undef $@;
}
$xref->{'-timet'} = $t;
return if DXDupe::check("xml,$o,$t,$id", $dupeage);
- $xref = bless $xref, $pkg;
- $xref->{'-xml'} = $line;
- $xref->handle_input($dxchan);
+ my $r = bless $xref, $pkg;
+ $r->{'-xml'} = $line;
+ $r->handle_input($dxchan);
}
#
if ($dxchan->handle_xml) {
$dxchan->send($self->toxml);
- } elsif ($dxchan->isnode) {
+ } elsif ($dxchan->is_node) {
my $ref = $self->topcxx($dxchan);
- if (ref $ref) {
- for (@$ref) {
- $dxchan->send($_);
- }
- } else {
- $dxchan->send($ref);
- }
+ $dxchan->send($ref);
} else {
my $ref = $self->tocmd($dxchan);
- if (ref $ref) {
- for (@$ref) {
- $dxchan->send($_);
- }
- } else {
- $dxchan->send($ref);
- }
+ $dxchan->send($ref);
}
}