Flowdalic/asmack — Issue #3: MXParser vs. XMLPullFactory when using getText()
Author: Flowdalic
Created: 2012-02-12 10:50:29+00:00
State: open

This is a clone of the old asmack issue #24 ( "Parser fails to process SimplePayload content in pubsub items" http://code.google.com/p/asmack/issues/detail?id=24 ). Pauolo described the underlying problem:
> In asmack there is a patch that replaces all instances of MXParser by an instance of a Parser returned by XMLPullFactory. This instance is actually an instance of KXmlParser. MXParser and KXmlParser both implement XmlPullParser interface but in reality they do not have the same behavior. When getText() is used and the next element is a TAG, MKParser returns a string containing the TAG, but KXmlParser returns null (after a check to the interface doc, the correct behavior is to return null).

> At this time I have no solution, I am trying to use KXmlParser to obtain the wanted behavior. After all, this is the MXParser used in smack that does not respect the interface spec.

> I do not know how use XmlPullParser, so if someone wants to help me, thanks in advance :) The problem is in the file org.jivesoftware.smackx.pubsub.provider.ItemProvider.java

So it seem that this should be reported and get fixed by upstream