private void addDescendantElements() throws NodeSelectorException {
        for (Node node : nodes) {
            List<Node> nl;
            if (node instanceof Document || node instanceof Element) {
                nl = DOMHelper.getElementsByTagName(node, selector.getTagName());
            } else {
                throw new NodeSelectorException("Only document and element nodes allowed!");
            }
            
            result.addAll(nl);
        }
    }
private void addDescendantElements ( ) throws NodeSelectorException { for ( Node node : nodes ) { List < Node > nl ; if ( node instanceof Document || node instanceof Element ) { nl = DOMHelper . getElementsByTagName ( node , selector . getTagName ( ) ) ; } else { throw new NodeSelectorException ( "Only document and element nodes allowed!" ) ; } result . addAll ( nl ) ; } }
Add descendant elements.

@see <a href="http://www.w3.org/TR/css3-selectors/#descendant-combinators">Descendant combinator</a>

@throws NodeSelectorException If one of the nodes have an illegal type.