[jdom-interest] JDOM and Oracle V2 Parser

Bradley S. Huffman hip at a.cs.okstate.edu
Tue Jul 2 21:19:01 PDT 2002


Andrew,

If I understand correctly Oracle's DOM implementation of Node.getNodeType()
is returning PROCESSING_INSTRUCTION_NODE instead of DOCUMENT_TYPE_NODE.

Hmmm, does Orcale's implementation give a non-DOM way to create a DocumentType
(like Xerces DocumentImpl), also does getDoctype() work correctly. If so I
wonder if we could patch OracleVDOMAdaptor so after it builds the document,
we make a scan of the child nodes, if we find a pi with a node name of "xml",
save the info. from getDocType, remove the pi, and create a new DocumentType
which hopefully returns DOCUMENT_TYPE_NODE. Guess this depends if the bug is
in the parser or the actual DOM implementation.

Since Oracle is so prevalent, it'd be nice to have a workaround in the adaptors
though.

Brad

Jason Hunter writes:

> Well, the bug only happens when taking a DOM built by the Oracle parser
> and passing it to JDOM for conversion.  So it seems a proper workaround
> would be to simply remove the <?xml?> PI from the DOM tree before
> passing it to the DOMBuilder.  This won't work if you're using
> DOMBuilder to build from a file, but you really shouldn't ever do that. 
> Does that help?
> 
> -jh-
> 
> Andrew Schneider wrote:
> > 
> > I have already CC'ed a response to the mailing list regarding this.  I scre
> wed up, and I meant to say IllegalTargetException, not IllegalAccessException
> .  Sorry.  So, the question is, I wanted to know if there was a work around w
> hen using the DOM parser (via the OracleV2DOMAdaptor) for Oracle for the Ille
> galTargetException issue (I know it is an Oracle bug, but we really cannot us
> e a different parser).
> > 
> > Thanks,
> > Andrew
> > 
> > >>> Jason Hunter <jhunter at servlets.com> 07/02/02 02:01PM >>>
> > > We are evaluating JDOM to utilize on a project.  It has been decided to u
> se Oracle's parser here on the project (it is a full Oracle shop from databas
> e to app server).  I have read through the archives about the issue regarding
>  IllegalAccessException and the reasons behind why it is occurring.  My quest
> ion is, is there a work around to this, so we can use JDOM in conjunction wit
> h the Oracle Parser?  I searched the archives, but could find nothing address
> ing this.
> > 
> > I don't remember the issue.  Are you hitting it?
> > 
> > > Also, since we will be using the Oracle parser exclusively, will there be
>  any need to have the xerces.jar in the classpath?
> > 
> > Nope, no need.
> > 
> > -jh-
> > 
> > *******************************************************************
> > Confidentiality Notice: This e-mail message, including any
> > attachments, is for the sole use of the intended recipient(s)
> > and may contain confidential and privileged information. Any
> > unauthorized review, use, disclosure or distribution is prohibited.
> > If you are not the intended recipient, please contact the sender
> > by reply e-mail and destroy all copies of the original message.
> > *******************************************************************
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost
> .com



More information about the jdom-interest mailing list