Hi guys so I'm trying to build a project that aligns to Ontologies; and I was searching for ontology example and I found this ontology on a PDF file and wanted to use it by copying-pasting it in a .owl file, but it won't work
String path="file:E:\\MSIR\\S4\\Jena Library\\PersonA.owl";
Model model = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM);
model.read(path);
but it gives me this error:
Exception in thread "main" org.apache.jena.riot.RiotException: [line: 6, col: 6 ] The processing instruction target matching "[xX][mM][lL]" is not allowed.
Please tell me what to do? Am I not supposed to just copy and paste the ontology code? should I create my ontology from scratch, and how would I do so? Thank you in advance.