parser.getOptions().setStrictErrorMode();
try {
java.lang.reflect.Field arpfField = parser.getClass().getDeclaredField("arpf");
arpfField.setAccessible(true);
RDFXMLParser arpf = (RDFXMLParser) arpfField.get(parser);
java.lang.reflect.Field saxParserField = arpf.getClass().getDeclaredField("saxParser");
saxParserField.setAccessible(true);
org.apache.xerces.parsers.SAXParser saxParser = (org.apache.xerces.parsers.SAXParser) saxParserField.get(arpf);
saxParser.setFeature("http://xml.org/sax/features/external-general-entities", false);
} catch (NoSuchFieldException|IllegalAccessException|SAXException e) {
throw new RuntimeException("should not be here");