for (int i = 0; i < size; i++) {
Object object = list.get(i);
if (object instanceof ProcessingInstruction) {
ProcessingInstruction pi = (ProcessingInstruction) object;
if (target.equals(pi.getName())) {
answer.addLocal(pi);
}
}
}
return answer;
} else {
if (shadow instanceof ProcessingInstruction) {
ProcessingInstruction pi = (ProcessingInstruction) shadow;
if (target.equals(pi.getName())) {
return createSingleResultList(pi);
}
}
return createEmptyList();