I am making an application as homework fo开发者_StackOverflowr my course for interactive TV using Osmosys (an implementation of MHP) as middleware.
I'm trying to read an XML file using:
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(file);
When I run it with the XleTView (an emulator) it says:
java.lang.NoSuchMethodError: javax.xml.parsers.DocumentBuilder.parse(Lxjava/io/File;)Lorg/w3c/dom/Document;
What am I doing wrong?
The Class that you are using don´t works in MHP (mph use java 1.3 i think), Use NanoXML.
Hi, MHP uses java 1.1 until java 1.3 I think..., so when you call a class that is not are soported at this distribution show (java.lang.NoSuchMethodError...). To solved you could use the NANOXML.
精彩评论