1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-23 04:22: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; package org.jivesoftware.smack;
import org.xmlpull.v1.*; import org.xmlpull.v1.*;
import org.xmlpull.mxp1.MXParser;
import java.util.*; import java.util.*;
import java.util.List; import java.util.List;
@ -74,10 +75,8 @@ class PacketReader {
listenerThread.setDaemon(true); listenerThread.setDaemon(true);
try { try {
XmlPullParserFactory factory = XmlPullParserFactory.newInstance( parser = new MXParser();
"org.xmlpull.mxp1.MXParserFactory", null); parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
factory.setNamespaceAware(true);
parser = factory.newPullParser();
parser.setInput(connection.reader); parser.setInput(connection.reader);
} }
catch (XmlPullParserException xppe) { catch (XmlPullParserException xppe) {

View file

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

View file

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

View file

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