[jdev] Splitting the stream
m at tthias.eu
Wed Nov 1 07:19:31 CST 2006
Michal 'vorner' Vaner schrieb:
> Do you think, if I have the XML stream (incoming one) and I want to
> split it, is it enough to count starting and ending tags, or they could
> be embedded in something like attribute? (eg. is <tag attr='<tag>'/> a
> legal thing or not?).
<tag attr='<tag>'/> is not legal ... but note that <tag attr='tag>'/> is
> And, if I have these split things and insert them between the stream
> header I got in the beginning and an corresponding stream end, can I
> parse it using DOM parser for each separate stanza?
> <stream:stream xmlns=....>
> <message ...>
This representation (single stanza wrapped inside a stream root element)
is what I am currently using in my new changes to jadc2s.
> - can the thing depend or previous stanzas, or it depends only on the
> stream header? (with prefixes and so)
Some implementations (e.g. jabberd14, jabberd2) even only store and
process the stanza without the stream root element. So a stanza wrapped
by the root element should be okay as well.
Matthias Wimmer Fon +49-700 77 00 77 70
Züricher Str. 243 Fax +49-89 95 89 91 56
81476 München http://ma.tthias.eu/
More information about the JDev