protected boolean elements ( String ... name ) { if ( name == null || name . length != stack . size ( ) ) { return false ; } for ( int i = 0 ; i < name . length ; i ++ ) { if ( ! name [ i ] . equals ( stack . get ( i ) ) ) { return false ; } } return true ; }
Checks whether the element stack currently contains exactly the elements supplied by the caller . This method can be used to find the current position in the document . The first argument is always the root element of the document the second is a child of the root element and so on . The method uses the local names of the elements only . Namespaces are ignored .