Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I import Xerces?

843834Aug 21 2009 — edited Aug 21 2009
Ok i'm sure this should be an FAQ but I'v googled it and got nowhere. I'm probably being really blind.

But: I'm trying to use the Xerces parser in my program, and I am importing the following:
import org.apache.xerces.parsers.SAXParser;
for use in the following method:
        public void process(Session session) throws IOException, SAXException {
                // Create a Xerces SAXParser

                SAXParser parser = new SAXParser();
                // Content handler

                parser.setContentHandler(this);
                parser.setReaderFactory(new StreamingCharFactory());

                // save the session
                this.session = session;

                // Start the parsing..
                parser.parse(new InputSource(session.getReader()));
        }
Yet, my IDE is telling underlining the "org.apache" of the import and complaining that it cannot be resolved. I understand that I have to import the parser, ie the xml-apis.jar and xercesImpl.jar, yet where do I put them?? :s Any help to de-confuse me would be very much appreciated! :)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 18 2009
Added on Aug 21 2009
2 comments
395 views