[JDEV] XML Requirements for Parsing Jabber Messages

Ulrich Staudinger chicago5 at gmx.de
Sat Nov 2 12:55:18 CST 2002


Hi Tony, 

> 1) Does the parser need to be multibyte aware? Can I transmit BIG5
> strings in the XML messages? Or should I only use unicode with UTF8
> encoding?

I recommend you only use UTF-8. Afaik it's the only encoding really
supported, jabber stream will be closed from server side if you try an
unsupported encoding like UTF-16 or BIG5.

> 
> 2) Is there any requirement for name entities?


> 
> 3) Is there any requirement for handling DTDs?
If you want to check/validate against a dtd, then do so. 

> 
> 4) Does Jabber require processing instruction?
> 
Jabber does not use/require processing instruction, but it should be
possible to transmit them in certain areas of the jabber stream, i.e. in
the x-tag. i am not sure if instructions like <?...?> are allowed inside
the stream. 


> 6) Do we need strict XML validation?
> 
Up to you if you want to validate the stream you recieve. I don't
recommend it, because you propably won't get happy when validating.

> I understand Jabber wants Jabber clients to be extremely simply. But I
> think XML parsing is not a simple stuff alone, unless we are only using
> a subset of XML syntaxes or we simply use a full-blown XML parser.
> 

There is only use for a full blown parser if you are in need of those
extra functions.

hope i helped, 
ulrich



More information about the JDev mailing list