private List<TagNode> findMatchingTagNodes(ITagNodeCondition condition, boolean isRecursive){
        List<TagNode> result = new LinkedList<TagNode>();
        if (condition == null) {
            return result;
        }

        for (Object item : children) {
            if (item instanceof TagNode) {
                TagNode currNode = (TagNode) item;
                if (condition.satisfy(currNode)) {
                    result.add(currNode);
                }
                if (isRecursive) {
                    List<TagNode> innerList = currNode.findMatchingTagNodes(condition, isRecursive);
                    if (innerList != null && innerList.size() > 0) {
                        result.addAll(innerList);
                    }
                }
            }
        }

        return result;	
    }