the 0x03 is probably the offending character...
By the way, IMHO the point is not what is formally in the standard, but what makes sense. Is there any advantage in throwing an exception if I try to write a binary code? If yes, it is ok. If it is just because 0x3 is not listed in the specs, I would have some things to say.
I really love jibx, but being too strictly rigoruse dimineshes its applications. Unfortunately, the external world is not so conformant and I think jibx should be flexible in how sever it has to be. It is the same problem with namespaces. There is no way to say: " listen, forget about namespaces, just parse the tags! ".
I know, I have no rights to pretend anything, take that feedbacks as user comments. If you will consider it for a fix, I would really appreciate it. If you won't fix it, I will do it just for my project.
Thanks for the good work,
Stefano
Dennis Sosnoski wrote:
What are the actual binary values of those characters in your string? The error message is saying that one of them is a 0x03, which is completely illegal in XML 1.0.
- Dennis
Stefano Fornari wrote:
Hi All,
We are using JiBX in a production system; unfortunately, we are facing some problems that I hope somebody can help with.
This is the latter:
org.jibx.runtime.JiBXException: Error writing marshalled document
Root cause: java.io.IOException: Illegal character code 0x3 in content text
at org.jibx.runtime.impl.MarshallingContext.element(MarshallingContext.java:642)
Caused by:
java.io.IOException: Illegal character code 0x3 in content text
at org.jibx.runtime.impl.UTF8StreamWriter.writeTextContent(UTF8StreamWriter.java:254)
at org.jibx.runtime.impl.MarshallingContext.element(MarshallingContext.java:638)
This happens marshalling the following XML snippet:
<Cred> <Meta><Type>syncml:auth-md5</Type></Meta> <Data>N?�U#>G?a�???�??</Data> </Cred>
With the following mapping:
<mapping name="Cred" class="sync4j.framework.core.Cred">
<structure field="authentication" class="sync4j.framework.core.Authentication">
<structure name="Meta" class="sync4j.framework.core.Meta">
<value name="Format" field="format" usage="optional"/>
<value name="Type" field="type"/>
</structure>
<structure name="Data" usage="optional">
<value field="data" style="text" class="sync4j.framework.core.Data" usage="optional"/>
</structure>
</structure>
</mapping>
It looks like a bug in the writer.
Regards,
Stefano
-- Stefano Fornari [EMAIL PROTECTED] Funambol CTO www.funambol.com
6472 Camden Ave #106 Via dei Valtorta 21 San Jose, CA 95120 (USA) 20127 Milano (Italy) Tel.: +1 408 705 2044 Tel.: +39 02 2614 5383 Fax: +1 408 705 2044 Fax: +39 02 7005 60230
Your Synchronization Company
------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id�66&op=click _______________________________________________ jibx-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jibx-users
