QueryProcessor proc1 = new QueryProcessor("/MappingRequest/Mappings", context);
Iter iter1 = proc1.iter();
for(Item item1; (item1 = iter1.next()) != null;) {
QueryProcessor proc2 = new QueryProcessor("Mapping", context);
proc2.context(item1);
Iter iter2 = proc2.iter();
for(Item item2; (item2 = iter2.next()) != null;) {
System.out.println(((ANode) item2).qname());
}
}
More compact (but may be less efficient if you do not want to process all results):
QueryProcessor proc1 = new QueryProcessor("/MappingRequest/Mappings", context);
for(Item item1 : proc1.value()) {
for(Item item2 : new QueryProcessor("Mapping", context).context(item1).value()) {
System.out.println(item2.serialize());
}
}
> Secondly to this I need to workout how to perform the queries via a