diff options
Diffstat (limited to 'src/com/isode/stroke/parser/payloadparsers')
-rw-r--r-- | src/com/isode/stroke/parser/payloadparsers/DiscoInfoParser.java | 5 | ||||
-rw-r--r-- | src/com/isode/stroke/parser/payloadparsers/DiscoItemsParser.java | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/com/isode/stroke/parser/payloadparsers/DiscoInfoParser.java b/src/com/isode/stroke/parser/payloadparsers/DiscoInfoParser.java index acd1ae0..181caa2 100644 --- a/src/com/isode/stroke/parser/payloadparsers/DiscoInfoParser.java +++ b/src/com/isode/stroke/parser/payloadparsers/DiscoInfoParser.java @@ -19,6 +19,11 @@ public class DiscoInfoParser extends GenericPayloadParser<DiscoInfo> { } public void handleStartElement(String element, String ns, AttributeMap attributes) { + if (level_ == TopLevel) { + if (attributes.getAttributeValue("node") != null) { + getPayloadInternal().setNode(attributes.getAttributeValue("node")); + } + } if (level_ == PayloadLevel) { if (element .equals("identity")) { getPayloadInternal().addIdentity(new DiscoInfo.Identity(attributes.getAttribute("name"), attributes.getAttribute("category"), attributes.getAttribute("type"), attributes.getAttribute("lang", "http://www.w3.org/XML/1998/namespace"))); diff --git a/src/com/isode/stroke/parser/payloadparsers/DiscoItemsParser.java b/src/com/isode/stroke/parser/payloadparsers/DiscoItemsParser.java index 091fd32..abf7c29 100644 --- a/src/com/isode/stroke/parser/payloadparsers/DiscoItemsParser.java +++ b/src/com/isode/stroke/parser/payloadparsers/DiscoItemsParser.java @@ -26,6 +26,11 @@ public class DiscoItemsParser extends GenericPayloadParser<DiscoItems> { getPayloadInternal().addItem(item); } } + else if (level_ == TopLevel) { + if (element.equals("query")) { + getPayloadInternal().setNode(attributes.getAttribute("node")); + } + } ++level_; } |