+ // Some parameters here may be arrays of values.
+ // Also, the tests expect an empty array to be represented as an empty value.
+ $value = (array) $value;
+ if (count($value) === 0) {
+ // Create an empty value.
+ $value[] = '';
+ }
+
+ foreach ($value as $val) {
+ $xw->startElement($key);
+ $xw->text($val);
+ $xw->fullEndElement();
+ }