$w->dataElement( 'requesttype' => $function );
- foreach my $opt ( keys %$opts ) {
-
- $w->dataElement( $opt => $opts->{$opt} );
-
+ if ( keys %$opts ) {
+ $w->startTag('item');
+ foreach my $opt ( keys %$opts ) {
+ $w->dataElement( $opt => $opts->{$opt} );
+ }
+ $w->endTag('item');
}
$w->endTag('body');