From 579290a8ee0b81291a5bbd349f4f37a8cbfe2c84 Mon Sep 17 00:00:00 2001 From: Defend Date: Tue, 14 Feb 2017 20:06:41 +0300 Subject: [PATCH] Removed some uses newsItemList.Group class --- .../ru/defend/defdevteam/tstu/FeedParser.java | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/ru/defend/defdevteam/tstu/FeedParser.java b/app/src/main/java/ru/defend/defdevteam/tstu/FeedParser.java index 6ad91ad..4f9f068 100644 --- a/app/src/main/java/ru/defend/defdevteam/tstu/FeedParser.java +++ b/app/src/main/java/ru/defend/defdevteam/tstu/FeedParser.java @@ -16,11 +16,10 @@ import javax.xml.parsers.DocumentBuilderFactory; public class FeedParser { ParserCallback callback; - NewsItemList newsItemList; String inputXML; interface ParserCallback { - void onSuccessParsing(NewsItemList newsItemList); + void onSuccessParsing(); void onFailureParsing(); } @@ -29,13 +28,10 @@ public class FeedParser { } FeedParser(String inputXML) { - newsItemList = new NewsItemList(); this.inputXML = inputXML; } void parseXML() { - - NewsItemList.Group group = new NewsItemList().new Group(); // <---Remove that try { DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); // Создается дерево DOM документа из файла @@ -43,17 +39,14 @@ public class FeedParser { // Получаем корневой элемент Node root = document.getDocumentElement(); - String exp = root.getTextContent(); // <---Remove that - group.set("Node",exp,""); // <---Remove that - newsItemList.add(group);// <---Remove that + String exp = root.getTextContent(); + //group.set("Node",exp,""); + //newsItemList.add(group); } catch (Exception e) { e.printStackTrace(); } - group.set("Node2","end",""); // <---Remove that - newsItemList.add(group);// <---Remove that - group.set("Node3","2end",""); // <---Remove that - newsItemList.add(group);// <---Remove that - callback.onSuccessParsing(newsItemList); + + callback.onSuccessParsing(); } }