this special character is outputed when resultset is empty...Else in all
other cases it outputs an empty string.. Don't know why this happens.....
If any one has found a solution to this pls let me know.
regards,
Bejoy

-----Original Message-----
From: Dennis Sosnoski [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 06, 2003 6:24 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Invalid Characters in XMl Generated


0x00 is not allowed in XML documents under any circumstances, entity 
encoded or not - it's a value disallowed by the XML specification. The 
whole control character range of 0x00-0x1F is disallowed except for the 
whitespace charactres 0x09, 0x0A, and 0x0D. If you want the details 
check the specification at http://www.w3.org/TR/REC-xml#charsets

As to why this is being output by Castor, I can't help you on that 
issue. Does Castor just encode a null String as �? If it does, this 
is a serious error - it should throw a NullPointerException rather than 
generate an invalid document.

  - Dennis

Nair, Bejoy wrote:

>Thanks for info...But if it is a valid character why does the xml parser
>gives me error while parsing. Is there any way i can get the parser to
parse
>this document.
>regards,
>Bejoy
>
>-----Original Message-----
>From: Rhett Sutphin [mailto:[EMAIL PROTECTED]]
>Sent: Sunday, January 05, 2003 12:20 AM
>To: [EMAIL PROTECTED]
>Subject: Re: [castor-dev] Invalid Characters in XMl Generated
>
>
>Nair, Bejoy wrote:
>  
>
>>hi,
>>  I find that the xml generated from a bean object gives me invalid
>>characters. Marshalling used to work fine till i used it on this bean
>>object. The only change i see here is that the bean is empty and contains
>>    
>>
>no
>  
>
>>data. The resultset which feeds data in the bean did not retrieve any data
>>from the database and hence the bean was marshalled without any data in
>>    
>>
>it.
>  
>
>>I am unable to understand why this happens.. I also tried initializing the
>>bean data elements with a default value, still i am getting the garbage
>>characters. I am pasting the xml file snippet  below.
>><?xml version="1.0"?>
>><ndt plan-status="&#x0;" plan-iD="0" plan-num="" plan-type-code="">
>>      <deferral-limit-amount>0</deferral-limit-amount>
>>      
>>
>>    
>>
><emp-elig-under-related-qual-plans>&#x0;</emp-elig-under-related-qual-plans
>
>  
>
>>      <collective-bargaining-units>0</collective-bargaining-units>
>>      <non-union-employees-eligible>&#x0;</non-union-employees-eligible>
>>    
>>
>
>If the "garbage characters" you refer to are &#x0;, know this:  that is 
>an XML entity reference.  It refers to character 0x00 in the XML doc's 
>character set.  In unicode (and in ISO-8859-1) that is the null 
>character, which in java would be written as '\0'.
>
>If that isn't what you are referring to as "garbage characters," please 
>clarify.
>
>HTH,
>Rhett Sutphin
>
>----------------------------------------------------------- 
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
>       unsubscribe castor-dev
>
>----------------------------------------------------------- 
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
>       unsubscribe castor-dev
>
>  
>

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to