For the following code:
Model m2=ModelFactory.createDefaultModel();
m2.read("Untitled.xml");
I get the error: Exception in thread "main" com.hp.hpl.jena.shared.JenaException: java.net.MalformedURLException: no protocol: Untitled.xml
Could anyone please help me out?
it expect an url, try
m2.read(new File("Untitled.xml").toURL().toString());