File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes Please help~ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Please help~ " Watch "Please help~ " New topic

Please help~

Serena Chen
Ranch Hand

Joined: Aug 15, 2002
Posts: 38
I compiled the program TACparsing fine but when I tried to run it. I got this exeption thrown:
"org.xml.sax.SAXException: System property org.xml.sax.driver not specified
at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory
at TACparsing.main("

so it's complaining the line:
"XMLReader xr = XMLReaderFactory.createXMLReader();"
so, I looked up some XML&Java books and it says I need to check if my .jar has org.xml.sax blah blah but I don't know wher eI should look for those .jar files(which directory exactly?). Well, I am using SDK 1.4.1, someone told me it already came with all the files/classes I need for SAX/DOM and I don't need to download extra from vendor sites. is it true? then, how do I double check if I already have the parser?
does the error above telling me that I don't have the parser? and if so, what should I do?
All the java books don't explain well enough in setting up parser etc. please help, any input is appreciated~!
Fisher Daniel
Ranch Hand

Joined: Sep 14, 2001
Posts: 582
I think you can use classes in javax.xml.parsers.
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser parser = factory.newSAXParser();
After that you can parse your xml data using parser object...
Correct me if i am wrong
Roseanne Zhang
Ranch Hand

Joined: Nov 14, 2000
Posts: 1953
Your answer here
Q. What should I do when I get "org.xml.sax.SAXException: System property org.xml.sax.driver not specified"?
I agree. Here's the link:
subject: Please help~
It's not a secret anymore!