You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by richard cai <ca...@yahoo.com> on 2001/11/06 17:03:29 UTC

SAX2 and DTD elements

Hi, I know that SAX2 doesn't support things like
!DOCTYPE.  But does the presense of these things
interfere with parsing using SAX2? (Well, they
shouldn't).  

However, I just ran into a case in that the presense
of <!DOCTYPE ...> seems to screw up the parsing (to be
exact, public void characters(char ch[], int start,int
length) seems no longer be able to function.).  Any
ideas?

Thanks.

Richard Cai


__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

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


Re: SAX2 and DTD elements

Posted by Elliotte Rusty Harold <el...@metalab.unc.edu>.
At 1:32 PM +0900 11/7/01, Andy Clark wrote:
>richard cai wrote:
>>  However, I just ran into a case in that the presense
>>  of <!DOCTYPE ...> seems to screw up the parsing (to be
>>  exact, public void characters(char ch[], int start,int
>>  length) seems no longer be able to function.).  Any
>>  ideas?
>

By any chance is the problem that you're missing nodes that contain 
only white space? If so this is the expected behavior, and you need 
to use the ignorableWhiteSpace() method too. This method only gets 
invoked when the document has a DTD that can identify certain 
elements as having only child element content.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@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/     |
+----------------------------------+---------------------------------+

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


Re: SAX2 and DTD elements

Posted by Andy Clark <an...@apache.org>.
richard cai wrote:
> However, I just ran into a case in that the presense
> of <!DOCTYPE ...> seems to screw up the parsing (to be
> exact, public void characters(char ch[], int start,int
> length) seems no longer be able to function.).  Any
> ideas?

Any more info?

-- 
Andy Clark * IBM, TRL - Japan * andyc@apache.org

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