private void addNthChild() {
        for (Node node : nodes) {
            int count = 1;
            Node n = DOMHelper.getPreviousSiblingElement(node);
            while (n != null) {
                count++;
                n = DOMHelper.getPreviousSiblingElement(n);
            }
            
            if (specifier.isMatch(count)) {
                result.add(node);
            }
        }
    }
private void addNthChild ( ) { for ( Node node : nodes ) { int count = 1 ; Node n = DOMHelper . getPreviousSiblingElement ( node ) ; while ( n != null ) { count ++ ; n = DOMHelper . getPreviousSiblingElement ( n ) ; } if ( specifier . isMatch ( count ) ) { result . add ( node ) ; } } }
Add the {@code :nth-child} elements.

@see <a href="http://www.w3.org/TR/css3-selectors/#nth-child-pseudo"><code>:nth-child</code> pseudo-class</a>