aspose file tools*
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Please help~ " Watch "Please help~ " New topic
Author

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
.java:90)
at TACparsing.main(TACparsing.java:119)"

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.
Example
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
thanks
daniel
SCJP
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"?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Please help~