[JDEV] XML Requirements for Parsing Jabber Messages
Matthew A. Miller
linuxwolf at outer-planes.no-ip.com
Sat Nov 2 14:51:14 CST 2002
As per the current Internet-Drafts[1], you can ignore the following XML
constructs (and therefore, should never be present in the XML stream):
* Comments
* DTD's
* External entity references[2]
* Processing Instructions
>From my experience, you can get away with a parser that simply doesn't
handle the above.
[1]
http://www.jabber.org/ietf/draft-miller-xmpp-core-01.html#xmlstreams-restrict
[2] Note that your XML parser should handle character entity
references, and must handle the predefined entity references:
& &
' '
> >
< <
" "
On Sat, 2002-11-02 at 10:55, Ulrich Staudinger wrote:
> 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
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
--
Matt "Linuxwolf" Miller
e-mail && jid: linuxwolf at outer-planes.net
- got JABBER? (http://www.jabbercentral.org/)
More information about the JDev
mailing list