DOMNode 객체를 전달받아 하위 노드를 전부 삭제.


function removeAllChild($node)
{
    if ($node!=null) {
        while ($node->childNodes->length) $node->removeChild($node->firstChild);
    }
}






Posted by bloodguy
,