Is there a way to create my own DOMNodeList? E.g.:
$doc = new DOMDocument();
$elem = $doc->createElement('div');
$nodeList = new DOMNodeList;
$nodeList->addItem($elem); // ?
My idea is to extend DOMDocument class adding some useful methods that return data as DOMNodeList.
Is it possible to do it without writing my own version of DOMNodeList class?