Google Answers Logo
View Question
 
Q: Using SAXParser in Java - XML ( No Answer,   0 Comments )
Question  
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());
}

}

}
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

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 Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy