Link to home
Start Free TrialLog in
Avatar of static86
static86

asked on

parsing xml (SAX)

Hi,
I followed tutorial on http://www.totheriver.com/learn/xml/xmltutorial.html
But Im getting error Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: Uncompilable source code in line sp.parse("http://localhost:8080/WebTools/keywords/api/user?pass=user", this);

what is wrong with this code?

	private void parseDocument() {

		//get a factory
		SAXParserFactory spf = SAXParserFactory.newInstance();
		try {

			//get a new instance of parser
			SAXParser sp = spf.newSAXParser();

			//parse the file and also register this class for call backs
			sp.parse("http://localhost:8080/WebTools/keywords/api/user?pass=user", this);

		}catch(SAXException se) {
			se.printStackTrace();
		}catch(ParserConfigurationException pce) {
			pce.printStackTrace();
		}
	}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial