Currently I am trying to simply step through my program in the debugger via 'f5'. However, each time I am met with "Source not found", & the debugger quits out despite the program actually running fine.
There are several other questions with similar problems. I tried those solutions - in particular the one found here. However, still no luck after attempting to add the "source" via the "source-lookup" option in the debug menu.
Here is the code:
package com.xmlParsing;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
public class DomParsingMain {
public static void main(String[] args) {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
try {
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse("DictionaryPractice.xml");
NodeList nl = doc.getElementsByTagName("definableterms");
for(int i = 0; i < nl.getLength(); i++) {
Node p = nl.item(i);
if(p.getNodeType() == Node.ELEMENT_NODE ) {
Element contents = (Element) p;
String attribute = contents.getAttribute("Introduction");
System.out.println(attribute);
}
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
And here is the screen that I get post 'f5' press:
Thanks for any help