add item tags around submissions
[Net-GlobalPOPs-MediaServicesAPI.git] / lib / Net / GlobalPOPs / MediaServicesAPI.pm
index 6b671fd..1622eaf 100644 (file)
@@ -134,10 +134,12 @@ sub AUTOLOAD {
 
       $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');