protected List<Node> getNodes(boolean recursive, String name) {
		ArrayList<Node> result = new ArrayList<Node>();
		Iterator i = contents.iterator();

		while (i.hasNext()) {
			Object o = i.next();
			if (o instanceof Node) {
				Node subNode = (Node) o;
				if ((name == null) || subNode.getName().equals(name)) {
					result.add(subNode);
				}
				if (recursive) {
					result.addAll(subNode.getNodes(recursive, name));
				}
			}
		}
		return result;
	}
protected List < Node > getNodes ( boolean recursive , String name ) { ArrayList < Node > result = new ArrayList < Node > ( ) ; Iterator i = contents . iterator ( ) ; while ( i . hasNext ( ) ) { Object o = i . next ( ) ; if ( o instanceof Node ) { Node subNode = ( Node ) o ; if ( ( name == null ) || subNode . getName ( ) . equals ( name ) ) { result . add ( subNode ) ; } if ( recursive ) { result . addAll ( subNode . getNodes ( recursive , name ) ) ; } } } return result ; }
@param recursive  indicates if all subnodes must be retrieved or only the nodes this node is parent of
@param name name of nodes that must be returned (exludes nodes with other names)
@return a list of subnodes