< prev index next >

test/javax/xml/jaxp/functional/javax/xml/xpath/ptests/XPathExpressionTest.java

Print this page




 474                 evaluate(new InputSource(is), NODE);
 475             assertEquals(attr.getValue(), "6");
 476         }
 477     }
 478 
 479     /**
 480      * Test for evaluate(InputSource source,QName returnType) return a node list
 481      * if returnType is NodeList.
 482      *
 483      * @throws Exception If any errors occur.
 484      */
 485     @Test
 486     public void testCheckXPathExpression31() throws Exception {
 487         try (InputStream is = Files.newInputStream(XML_PATH)) {
 488             NodeList nodeList = (NodeList) xpath.compile(EXPRESSION_NAME_A).
 489                 evaluate(new InputSource(is), NODESET);
 490             assertEquals(((Attr) nodeList.item(0)).getValue(), "6");
 491         }
 492     }
 493 }
 494 
 495 


 474                 evaluate(new InputSource(is), NODE);
 475             assertEquals(attr.getValue(), "6");
 476         }
 477     }
 478 
 479     /**
 480      * Test for evaluate(InputSource source,QName returnType) return a node list
 481      * if returnType is NodeList.
 482      *
 483      * @throws Exception If any errors occur.
 484      */
 485     @Test
 486     public void testCheckXPathExpression31() throws Exception {
 487         try (InputStream is = Files.newInputStream(XML_PATH)) {
 488             NodeList nodeList = (NodeList) xpath.compile(EXPRESSION_NAME_A).
 489                 evaluate(new InputSource(is), NODESET);
 490             assertEquals(((Attr) nodeList.item(0)).getValue(), "6");
 491         }
 492     }
 493 }


< prev index next >