On Wed, 10 Feb 2021 at 20:22, Florian Schmaus <[email protected]> wrote:

> Since you asked: Smack relies on the ordering (in case a non-default
> form field type is used), since Smack needs to see the <reported/> first
> to assign types to the field while parsing the following <item/>s.
>

Right, so you're parsing using a SAX-style parser and if <reported/> comes
after (or in between) the <item/>s, you'd need to use a two-pass parser, is
that correct?

This is more or less the case I suspected might exist. Most (if not all)
early XMPP libraries use that kind of approach, whereas a lot of later ones
pull stanzas out of the XMLStream as documents and then can do XPath-ish
things on them, so the order matters much less. Smack is, of course, as
early as they come (along with Strophe and Strophe.js, the former being
probably forgotten).

So the converse question - are there any libraries which couldn't generate
XML in order?

Dave.
_______________________________________________
Standards mailing list
Info: https://mail.jabber.org/mailman/listinfo/standards
Unsubscribe: [email protected]
_______________________________________________

Reply via email to