mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-10 10:49:41 +02:00
Substitute MXParser with a call to XmlPullParserFactory
This makes Smack more portable, as there are platforms that support the XmlPullParser interface, but not MXParser (e.g. Android). Also enable checkstyle check that MXParser is not used.
This commit is contained in:
parent
4db0b101c2
commit
24b637876f
18 changed files with 40 additions and 35 deletions
|
@ -22,7 +22,7 @@ import java.io.StringReader;
|
|||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.provider.IQProvider;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
import org.xmlpull.mxp1.MXParser;
|
||||
import org.xmlpull.v1.XmlPullParserFactory;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
/**
|
||||
|
@ -179,7 +179,7 @@ public class Macros extends IQ {
|
|||
public MacroGroup parseMacroGroups(String macros) throws Exception {
|
||||
|
||||
MacroGroup group = null;
|
||||
XmlPullParser parser = new MXParser();
|
||||
XmlPullParser parser = XmlPullParserFactory.newInstance().newPullParser();
|
||||
parser.setInput(new StringReader(macros));
|
||||
int eventType = parser.getEventType();
|
||||
while (eventType != XmlPullParser.END_DOCUMENT) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue