javaxmlmatlabviper

Unable to execute 'DocumentBuilderFactory' in matlab


Whenever I am running the following command I getting an error given below. Please tell which jar file I need to add to run the command in Matlab.

Command: docBuilder = DocumentBuilderFactory.newInstance();

Error:

Undefined variable "DocumentBuilderFactory" or class "DocumentBuilderFactory.newInstance".


Solution

  • From the comments, the solution is to use the following line instead:

    docBuilder = javax.xml.parsers.DocumentBuilderFactory.newInstance();