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

Elliotte Rusty Harold <[email protected]> Thu, 27 Feb 2003 07:26:00 -0500
Newsgroups gmane.comp.java.sun.xml.general
Message-ID <p04330100ba83b410e68b@[192.168.254.4]>
>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.
--

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | [email protected] | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|           Processing XML with Java (Addison-Wesley, 2002)          |
|              http://www.cafeconleche.org/books/xmljava             |
| http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA  |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+

-----------------------------------------------------
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.