        }
  
        return $result;
-@@ -416,12 +612,12 @@
+@@ -416,12 +615,12 @@
       * @param   var detail default NULL
       */    
      public function setFault($faultcode, $faultstring, $faultactor= NULL, $detail= NULL) {

      * Deserialize a single node
      *
      * @param   xml.Node child
@@ -290,9 +477,9 @@
           // <item>
           if (empty($child->children)) break;

               : $this->unmarshall($item->children[1], 'MAP')
             );
           }
@@ -305,7 +492,21 @@
           break;
           
         default:
-          if (!empty($child->children)) {
+          $s= sizeof($child->children);
+          if (0 === $s) return NULL;    // Empty node, e.g. <null xsi:nil="true"/>
+
+          // Text-only contents, e.g. <item xsi:type="xsd:int">5</item> versus
+          // Complex node, e.g. <array><string>one</string><string>two</string></array>
+          $text= TRUE;
+          foreach ($child->children as $c) {
+            if ($c instanceof Text) continue;
+            $text= FALSE;
+            break;
+          }
+          if ($text) {
+            $result= $this->childContent($child);
+          } else {
+          
             if ($this->namespaces[XMLNS_XSD] == $regs[1]) {
               $result= $this->_recurseData($child, TRUE, 'STRUCT');
               break;
@@ -347,8 +548,6 @@
             }
             break;
           }
