result.add(attr);
}
}
}
else if (node instanceof ProcessingInstruction) {
ProcessingInstruction pi = (ProcessingInstruction)node;
if ("target".equals(localName)) {
result.add(new DefaultAttribute("target", pi.getTarget()));
}
else if ("data".equals(localName)) {
result.add(new DefaultAttribute("data", pi.getText()));
}
else {
result.add(new DefaultAttribute(localName, pi.getValue(localName)));
}
} else if (node instanceof DocumentType) {
DocumentType doctype = (DocumentType)node;
if ("publicId".equals(localName)) {
result.add(new DefaultAttribute("publicId", doctype.getPublicID()));