protected Element findTag ( String tagName , Element element ) { Node result = element . getFirstChild ( ) ; while ( result != null ) { if ( result instanceof Element && ( tagName . equals ( ( ( Element ) result ) . getNodeName ( ) ) || tagName . equals ( ( ( Element ) result ) . getLocalName ( ) ) ) ) { break ; } result = result . getNextSibling ( ) ; } return ( Element ) result ; }
Find the child element whose tag matches the specified tag name .