RDFEHArray eh2 = new RDFEHArray();
try ( InputStream in = new FileInputStream("testing/wg/rdfms-xmllang/test003.rdf") ) {
XMLReader saxParser = new SAXParser();
SAX2Model handler = SAX2Model.create("http://example.org/", m2,
"fr");
SAX2RDF.installHandlers(saxParser, handler);
handler.setErrorHandler(eh2);
InputSource ins = new InputSource(in);
ins.setSystemId("http://example.org/");
try {
try {
saxParser.parse(ins);
} finally {
handler.close();
}
} catch (SAXParseException e) {
// already reported, leave it be.
}
}