Skip to content

Commit aa55171

Browse files
authored
Merge pull request #12 from godsgood33/master
XML comments
2 parents a59c60e + 787fd63 commit aa55171

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

LSS/Array2XML.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ private static function &convert($node_name, $arr = array()) {
133133
//return from recursion, as a note with cdata cannot have child nodes.
134134
return $node;
135135
}
136+
else if (isset($arr['@comment']) && is_string($arr['@comment'])) {
137+
$node->appendChild($xml->createComment(self::bool2str($arr['@comment'])));
138+
unset($arr['@comment']);
139+
}
136140
else if (isset($arr['@xml'])) {
137141
$fragment = $xml->createDocumentFragment();
138142
$fragment->appendXML($arr['@xml']);

0 commit comments

Comments
 (0)