Hi,
maybe this is a n00b-question.
I try to parse an xml-file like that:
<?xml version="1.0" encoding="UTF-8" ?>
<test>
<a></a>
</test>
with the following code:
public static void parse(File f) {
final DefaultHandler handler = new DefaultHandler() {
@Override
public void processingInstruction(String target, String data) throws SAXException {
System.out.println("Processing Instruction");
}
};
SAXParserFactory.newInstance().newSAXParser().parse(f, handler);
}
I expect the output "Processing Instruction"
to be printed on stdout. But this doesn't happen. Can somebody tell me why?