1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-26 22:12:05 +01:00

Modified to be compatible with latest minimal version of XPP. SMACK-49

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2466 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Gaston Dombiak 2005-03-23 02:36:19 +00:00 committed by gaston
parent 08f3b3dcba
commit 3f83402148
4 changed files with 12 additions and 17 deletions

View file

@ -21,6 +21,7 @@
package org.jivesoftware.smack;
import org.xmlpull.v1.*;
import org.xmlpull.mxp1.MXParser;
import java.util.*;
import java.util.List;
@ -74,10 +75,8 @@ class PacketReader {
listenerThread.setDaemon(true);
try {
XmlPullParserFactory factory = XmlPullParserFactory.newInstance(
"org.xmlpull.mxp1.MXParserFactory", null);
factory.setNamespaceAware(true);
parser = factory.newPullParser();
parser = new MXParser();
parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
parser.setInput(connection.reader);
}
catch (XmlPullParserException xppe) {

View file

@ -25,6 +25,7 @@ import java.net.*;
import java.util.*;
import org.xmlpull.v1.*;
import org.xmlpull.mxp1.MXParser;
/**
* Represents the configuration of Smack. The configuration is used for:
@ -69,11 +70,8 @@ public final class SmackConfiguration {
InputStream systemStream = null;
try {
systemStream = url.openStream();
XmlPullParserFactory factory =
XmlPullParserFactory.newInstance(
"org.xmlpull.mxp1.MXParserFactory", null);
factory.setNamespaceAware(true);
XmlPullParser parser = factory.newPullParser();
XmlPullParser parser = new MXParser();
parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
parser.setInput(systemStream, "UTF-8");
int eventType = parser.getEventType();
do {

View file

@ -23,6 +23,7 @@ package org.jivesoftware.smack.provider;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.PacketExtension;
import org.xmlpull.v1.*;
import org.xmlpull.mxp1.MXParser;
import java.util.*;
import java.net.URL;
@ -124,10 +125,8 @@ public class ProviderManager {
java.io.InputStream providerStream = null;
try {
providerStream = url.openStream();
XmlPullParserFactory factory = XmlPullParserFactory.newInstance(
"org.xmlpull.mxp1.MXParserFactory", null);
factory.setNamespaceAware(true);
XmlPullParser parser = factory.newPullParser();
XmlPullParser parser = new MXParser();
parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
parser.setInput(providerStream, "UTF-8");
int eventType = parser.getEventType();
do {

View file

@ -59,6 +59,7 @@ import javax.net.SocketFactory;
import org.jivesoftware.smack.XMPPConnection;
import org.xmlpull.v1.*;
import org.xmlpull.mxp1.MXParser;
import junit.framework.TestCase;
@ -292,10 +293,8 @@ public abstract class SmackTestCase extends TestCase {
InputStream systemStream = null;
try {
systemStream = url.openStream();
XmlPullParserFactory factory =
XmlPullParserFactory.newInstance("org.xmlpull.mxp1.MXParserFactory", null);
factory.setNamespaceAware(true);
XmlPullParser parser = factory.newPullParser();
XmlPullParser parser = new MXParser();
parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
parser.setInput(systemStream, "UTF-8");
int eventType = parser.getEventType();
do {