|
|
@@ -559,8 +559,16 @@ EOF';
|
|
|
if (!$parent) $parent = $dom;
|
|
|
if (is_array($data)) {
|
|
|
foreach ($data as $key => $value) {
|
|
|
- if (is_numeric($key)) $arrayToXML_rec($value, $dom, $node, $parent);
|
|
|
- else $arrayToXML_rec($value, $dom, $key, $child);
|
|
|
+ if ($key == '@attributes') {
|
|
|
+ foreach ($value as $attrName => $attrValue) {
|
|
|
+ $attr = $dom->createAttribute($attrName);
|
|
|
+ $attr->value = $attrValue;
|
|
|
+ $child->appendChild($attr);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (is_numeric($key)) $arrayToXML_rec($value, $dom, $node, $parent);
|
|
|
+ else $arrayToXML_rec($value, $dom, $key, $child);
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
if ($data) {
|