public static Node getOneTaggedNode ( final Node el , final String name ) throws SAXException { if ( ! el . hasChildNodes ( ) ) { return null ; } final NodeList children = el . getChildNodes ( ) ; for ( int i = 0 ; i < children . getLength ( ) ; i ++ ) { final Node n = children . item ( i ) ; if ( name . equals ( n . getNodeName ( ) ) ) { return n ; } } return null ; }
Get the single named element .