This will return a DOMList that is updated every time the DOM is modified. I'd suggest converting to an array before performing any further modifications (see DomUtils.getElementsByTagNameNS).