I'm trying do a simple SAX exercise. My work files are on my d:\workspace\xml directory and I'm running win2k pro. I have extracted saxjava-1.0.zip to e:\XML\sax, the jdk to e:\j2sdk1.4.0, and james clark xp parser to e:\XML\xp
I have set my environment variables according to the book
variable: CLASSPATH
value: .;E:\XML\sax;E:\XML\xp\xp.jar
when I compile my java file I get the error:
package com.jclark.xml.sax does not exist
Parser parserObj = new com.jclark.xml.sax.Driver();
Note: BandReader.java uses or overrides a deprecated API
Note: Recompile with -deprecated for details
1 error
When I go into the directory E:\XML\xp\com\jclark\xml\sax , the file "Driver.java" is there
code in my BandReader.java file
import org.xml.sax.*;
public class BandReader extends HandlerBase {
public static void main(String[] args) throws Exception {
System.out.println("Here we go...");
BandReader readerObj = new BandReader();
readerObj.read();
}
public void read () throws Exception {
Parser parserObj = new com.jclark.xml.sax.Driver();
parserObj.setDocumentHandler (this);
parserObj.parse ("file:///d:/workspace/xml/bands.xml");
}
public void startDocument() throws SAXException {
System.out.println("Starting...");
}
public void endDocument() throws SAXException {
System.out.println("...Finished");
}
public void startElement(String name, AttributeList atts) throws SAXException {
System.out.println("Element is " + name);
}
}