Element child2 = new Element("pre:child", "http://www.example.com/");
parent.appendChild(child1);
parent.appendChild(child2);
grandparent.appendChild(parent);
Nodes result = doc.query("descendant::*[name(.)='pre:child']");
assertEquals(2, result.size());
assertEquals(child1, result.get(0));
assertEquals(child2, result.get(1));
}