logo       

Re: Entities serilization problem. Potential bug?!?: msg#00003

java.enhydra.kxml

Subject: Re: Entities serilization problem. Potential bug?!?

Hi Bogdan,

how are you doing the transcoding? If you use the roundtrip sample to
transcode the given valid XML string to WBXML, and the WBXML back to
XML, is the result different from the original string? Are you using the
latest version from CVS?

Best regards,
Stefan

BTW: Please note that ObjectWeb will close this list soon. Please subscribe to the new kxml mailinglist at http://sourceforge.net, project kxml.



Bogdan Onoiu wrote:
Hi Stefan,
It seems that sooner or later I need to deal with this weird problem I
have for some months now. I cannot spot the wrong point in the code so I
am asking your help.
Basically it is about serializing to WBXML some XML content that was
escaped to entites before being pussed to the parser
So if one XML node contains something like:
<ContentData>(06/15/2004 00:31) &lt;HTML&gt;&lt;BODY
BGCOLOR="#ffffff"&gt;&lt;FONT
LANG="0"&gt;hiho&lt;/FONT&gt;&lt;/BODY&gt;&lt;/HTML&gt;</ContentData>
which is a valid XML and I try to transcode this to WBXML, I am
expecting that at most the serializer is resolving correctly the
entities and pushes to WBXML (eg "<" for &lt; or ">" for &gt;) or at
least leaves the content as such.
This is not actually happening and this is what the Ethereal sees being
transformed over the wire starting at pozition "019a" you can see a
weird "0003" sequence repeted at every &lt; entity.

BTW, I don't get it why this is done this way:
public void entityRef(String er) throws IOException {
throw new RuntimeException("EntityReference not supported
for WBXML" + er);
}
Don't see why it shouldn't. Is up to the WBXMLParser (or wbxml client in
general) to understand and escape the entitites. Is it specified in the
WBXML specs like this?
Some help for this will be highly appreciated.
Cheers,
Bogdan Onoiu



------------------------------------------------------------------------



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise