use of org.exist.xquery.ChildSelector in project exist by eXist-db.
the class BasicNodeSetTest method childSelector.
@Test
public void childSelector() throws XPathException, EXistException {
NodeSelector selector = new ChildSelector(seqSpeech.toNodeSet(), -1);
NameTest test = new NameTest(Type.ELEMENT, new QName("LINE", ""));
try (final DBBroker broker = existEmbeddedServer.getBrokerPool().get(Optional.of(existEmbeddedServer.getBrokerPool().getSecurityManager().getSystemSubject()))) {
NodeSet set = broker.getStructuralIndex().findElementsByTagName(ElementValue.ELEMENT, seqSpeech.getDocumentSet(), test.getName(), selector);
assertEquals(9492, set.getLength());
}
}
Aggregations