question: public static NodeList selectNodeList ( Node doc , String str , NamespaceContext nsctx ) throws XPathException { XPathFactory xpf = xpathFactoryCache . getInstanceForCurrentThread ( ) ; XPath xpath = xpf . newXPath ( ) ; xpath . setNamespaceContext ( nsctx ) ; XPathExpression expr = xpath . compile ( str ) ; return ( NodeList ) expr . evaluate ( doc , XPathConstants . NODESET ) ; }
target:  Use an XPath string to select a nodelist Namespace prefix is resolved using the the specified context.