Re: JAXP and setting org.xml.sax.driver

"William W. Nelson" <[email protected]> Thu, 27 Feb 2003 15:52:08 -0500
Newsgroups gmane.comp.java.sun.xml.general
Message-ID <[email protected]>
Elliotte,

Wow, I am actually using your book "Processing XML with Java" as a guide, and that is exactly what you say in your book.  But my question is, how do I, or can I, permanently set this system property?  Is there a system property file I can edit?  I found in the archives that I can code System.setProperty() in my program to set the property to the crimson parser, and that works, but only on the fly.  I also notice that when I tried using org.apache.xerces.parsers.SAXParser that class wasn't found, so apparently the jsdk 1.4 download only contains org.apache.crimson.parser.XMLReaderImpl.

tia


----------------
>Hi,
>
>I have installed j2sdk1.4 on a Windows XP PC.  JAXP is included in 1.4.
>I have coded a Java program to use
>XMLReaderFActory.createXMLReader() to get an XMLReader parser
>object.  However, when I execute it, I get an exception, "System
>property org.xml.sax.driver not specified."
>If I specify a one-time value for this property using the -D flag
>with the Java interpreter, it works okay:
>

The SAX implementation you're using is buggy.
XMLReaderFactory.createXMLReader() should fall back to a default
parser if the org.xml.sax.driver property is not set, but a lot of
parsers get this one wrong.

-----------------------------------------------------
xml-interest: A list for discussing XML technologies in the Java Platform.
To post, mailto:[email protected]
Archives at: http://archives.java.sun.com/xml-interest.html
To unsubscribe, mailto:[email protected] the following message;
signoff xml-interest.