[jdom-interest] Underlying JDOM Parser

Elliotte Rusty Harold elharo at metalab.unc.edu
Fri Feb 15 11:49:44 PST 2002


At 11:28 AM -0800 2/15/02, Jason Hunter wrote:
>Elliotte Rusty Harold wrote:
>>
>>  >Good question.  You can tell JDOM which parser to use.  If you don't, it
>>  >tries to use JAXP, and if JAXP fails it tries Xerces.  But as far as
>>  >which version was found, since it depends on what's in your classpath,
>>  >you could be in the dark.  I don't know if parsers expose that
>>  >information.  On a quick look I don't see it.
>>  >
>>
>>  I think it's been suggested as a standard SAX property for future
>>  releases of SAX. But in the meantime asking for the name of the
>>  XMLReader implementation class with getClass().getName() would
>>  probably be enough. For DOM you could look at the package name of the
>>  DOM Document implementation class.
>
>That would indicate the parser name, but not the version, right?
>

Right. However, it might be enough to tell the difference between 
major versions if the parser name changed between versions. I assume 
this is just for debugging, in which case any reasonable string we 
could offer to the developer might be helpful.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|          The XML Bible, 2nd Edition (Hungry Minds, 2001)           |
|              http://www.ibiblio.org/xml/books/bible2/              |
|   http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.ibiblio.org/xml/     |
+----------------------------------+---------------------------------+



More information about the jdom-interest mailing list