Skip to content

Commit 7f804fd

Browse files
committed
Allow insertion of DOMObjects provided by the array.
1 parent 08ee5a4 commit 7f804fd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

LSS/Array2XML.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@
5656
*/
5757
class Array2XML {
5858

59+
/**
60+
* @var DOMDocument
61+
*/
5962
private static $xml = null;
6063
private static $encoding = 'UTF-8';
6164

@@ -128,6 +131,11 @@ private static function &convert($node_name, $arr = array()) {
128131
//return from recursion, as a note with cdata cannot have child nodes.
129132
return $node;
130133
}
134+
else if (isset($arr['@dom'])) {
135+
$node->appendChild($arr['@dom']);
136+
unset($arr['@dom']);
137+
return $node;
138+
}
131139
}
132140

133141
//create subnodes using recursion

0 commit comments

Comments
 (0)