|
|
Subject:
Using SAXParser in Java - XML
Category: Computers > Programming Asked by: ddd5119-ga List Price: $5.00 |
Posted:
23 Feb 2004 07:06 PST
Expires: 01 Mar 2004 17:11 PST Question ID: 309815 |
-------------------------------------------------------------------- I have installed NetBeans IDE 3.5.1 with JDK 1.4.2 (bundle from java.sun.com). I have downloaded xerces2-j and installed it. I have set the classpath as well as mounted the file in NetBeans. I get the following error (with the above class), both in NetBeans and using the TextPad: SAX2 driver class org.apache.xerces.parsers.SAXParser not found What am I doing wrong? I need step-by-step instructions to make it work. If you can answer this question, I probably have several more for you. Thanks. ------------------------------------------------------------------- import org.xml.sax.InputSource; import org.xml.sax.XMLReader; import org.xml.sax.helpers.XMLReaderFactory; class Test{ public static void main (String args[]) { String parse = new String(); parse = "org.apache.xerces.parser.XMLReaderImpl"; try { XMLReader reader = XMLReaderFactory.createXMLReader(parse); InputSource inputSource = new InputSource("Test.xml"); reader.parse(inputSource); System.out.println("XML is well formed"); } catch (Exception e) { System.out.println(e.getMessage()); } } } |
|
There is no answer at this time. |
|
There are no comments at this time. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |