foreach ($attributes->contents
as $attribute) { $a->contents
[] =
$attribute;
} $o->
addRepresentation($a, 0
);
} // Set the children
if ($childNodes) { $c =
new Representation('Children'
);
if (1 === \
count($childNodes->contents
) && ($node = \
reset($childNodes->contents
)) && \
in_array('depth_limit',
$node->hints, true
)) { $n =
new InstanceValue();
$n->
transplant($node);
$n->name = 'childNodes';
$n->classname = 'DOMNodeList';
$c->contents =
[$n];
} else { foreach ($childNodes->contents
as $node) { // Remove text nodes if theyre empty
if ($node instanceof BlobValue && '#text' ===
$node->name
&& (\
ctype_space($node->value->contents
) || '' ===
$node->value->contents
)) { continue;
}