Skip to content

Commit bb661a1

Browse files
committed
Renamed to @xml; Now using DocumentFragment to insert and XML string as child;
1 parent 7f804fd commit bb661a1

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

LSS/Array2XML.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,10 @@ private static function &convert($node_name, $arr = array()) {
131131
//return from recursion, as a note with cdata cannot have child nodes.
132132
return $node;
133133
}
134-
else if (isset($arr['@dom'])) {
135-
$node->appendChild($arr['@dom']);
134+
else if (isset($arr['@xml'])) {
135+
$fragment = $xml->createDocumentFragment();
136+
$fragment->appendXML($arr['@xml']);
137+
$node->appendChild($fragment);
136138
unset($arr['@dom']);
137139
return $node;
138140
}

0 commit comments

Comments
 (0)