[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-j-dev
Subject:    Re: Code that throws the NullPointer
From:       Elena Litani <elitani () ca ! ibm ! com>
Date:       2003-03-19 22:17:26
[Download RAW message or body]

Kirsten Barber wrote:
> I have a Java class that manipulates the XMLDocument that I am using in a
> series of Java servlets.  Below is a part of the code, specifically the
> method that is throwing the nullpointer exception.  I have taken out some
> comments, but I have already verified that the variable "mainDoc" is not
> null when I am calling the .normalize() method.  
> It looks to me like
> normalize is calling several functions and one of them is throwing the null
> pointer exception.  So logically, the error would have to be in the
> Document, but my document parses using both XSelerator and XMLSpy.

Xerces does load the document you mention without any error. I actually
modified dom.Writer sample to add normalize() call on the document after
it is parsed (line 516) and there is no NPE.

Where do you get your document?
How do you load it? What features you turn on during loading?

Thanks,
-- 
Elena Litani / IBM Toronto

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic