Thanks a lot, Michael:
   Mine is element content. I will look into it with your suggestion. I used an 
older xercesImpl.jar before and it is OK, but that one is not compatible with 
Java SE 6 (just get run-time 1.6 update 5 installed and it doesn't use 1.5 any 
more). 
   Will keep you posted.

Regards,
peasnow
   

----- Original Message ----
From: Michael Glavassevich <[EMAIL PROTECTED]>
To: j-users@xerces.apache.org
Sent: Friday, April 11, 2008 4:26:38 PM
Subject: Re: Jave run-time 1.6+ mismatch with xercesImpl.jar?

Do you really mean an attribute value?

e.g. <foo bool="false"/>

or element content?

e.g. <foo><bool>false</bool></foo>

If it's the latter and you're using SAX you should know that characters()
may be called multiple times [1][2] for contiguous text. Your
ContentHandler needs to accumulate the text returned in each call of
characters() until you receive a callback that isn't characters. You cannot
assume that all character data of an element is reported in a single chunk.

Thanks.

[1]
http://xerces.apache.org/xerces2-j/javadocs/api/org/xml/sax/ContentHandler.html#characters(char[],%20int,%20int)
[2] http://xerces.apache.org/xerces2-j/faq-sax.html#faq-2

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]

Feng Chen <[EMAIL PROTECTED]> wrote on 04/11/2008 04:14:48 PM:

> Hi, Gurus.
> I am using the latest xercesImpl.jar; xml-apis.jar from release 2.9.
> 1 and Java run-time 1.6 update 5.
> When processing (read) a xml file, it seems I cannot read some
> attribute value completely
> for example, if the value is "false", it just gets "fals" or "fal"
>                    if the value is "1.66783E-5", it just get "1.
> 66783E-" or "1.66783E"
> It doesn't happen to all though, only some of them.
>
> Have any one met such problem before.
>
> Thanks.
>
> peasnow
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to