@ Pure public static Document getDocumentFor ( Node node ) { Node localnode = node ; while ( localnode != null ) { if ( localnode instanceof Document ) { return ( Document ) localnode ; } localnode = localnode . getParentNode ( ) ; } return null ; }
Replies the XML Document that is containing the given node .