logo       

Entities serilization problem. Potential bug?!?: msg#00002

java.enhydra.kxml

Subject: Entities serilization problem. Potential bug?!?

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