Fix xhtml namespace.
parent
6747046b6c
commit
16221e391d
|
@ -75,6 +75,7 @@ public class Xpath2Selector implements Selector {
|
|||
private XPath2NamespaceContext() {
|
||||
put("fn", NamespaceConstant.FN);
|
||||
put("xslt", NamespaceConstant.XSLT);
|
||||
put("xhtml", NamespaceConstant.XHTML);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1376,7 +1376,7 @@ public class XpathSelectorTest {
|
|||
|
||||
@Test
|
||||
public void testXpath2Selector() {
|
||||
Xpath2Selector xpath2Selector = new Xpath2Selector("//a/@href");
|
||||
Xpath2Selector xpath2Selector = new Xpath2Selector("//xhtml:a/@href");
|
||||
String select = xpath2Selector.select(html);
|
||||
Assert.assertEquals("http://www.oschina.net/", select);
|
||||
|
||||
|
|
Loading…
Reference in New Issue