From a7556f33a88aa622460d1f05f8869b88cb23ca93 Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Thu, 19 Apr 2012 14:31:52 +0100 Subject: Update parsing factories to allow empty namespaces, in line with Swiften diff --git a/src/com/isode/stroke/parser/GenericPayloadParserFactory.java b/src/com/isode/stroke/parser/GenericPayloadParserFactory.java index c9b258c..76f3fda 100644 --- a/src/com/isode/stroke/parser/GenericPayloadParserFactory.java +++ b/src/com/isode/stroke/parser/GenericPayloadParserFactory.java @@ -25,7 +25,7 @@ public class GenericPayloadParserFactory implements Pay } public boolean canParse(final String element, final String ns, final AttributeMap attributes) { - return element.equals(tag_) && xmlns_.equals(ns); + return (tag_.isEmpty() ? true : tag_.equals(element)) && (xmlns_.isEmpty() ? true : xmlns_.equals(ns)); } public final PayloadParser createPayloadParser() { -- cgit v0.10.2-6-g49f6