@Override public AgentStatusRequest parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException { AgentStatusRequest statusRequest = new AgentStatusRequest(); boolean done = false; while (!done) { int eventType = parser.next(); if (eventType == XmlPullParser.START_TAG && "agent".equals(parser.getName())) { statusRequest.agents.add(parseAgent(parser)); } else if (eventType == XmlPullParser.END_TAG && "agent-status-request".equals(parser.getName())) { done = true; } } return statusRequest; }
public IQ parseIQ(XmlPullParser parser) throws Exception { AgentStatusRequest statusRequest = new AgentStatusRequest(); if (parser.getEventType() != XmlPullParser.START_TAG) { throw new IllegalStateException("Parser not in proper position, or bad XML."); } boolean done = false; while (!done) { int eventType = parser.next(); if ((eventType == XmlPullParser.START_TAG) && ("agent".equals(parser.getName()))) { statusRequest.agents.add(parseAgent(parser)); } else if (eventType == XmlPullParser.END_TAG && "agent-status-request".equals(parser.getName())) { done = true; } } return statusRequest; }
public IQ parseIQ(XmlPullParser parser) throws Exception { AgentStatusRequest statusRequest = new AgentStatusRequest(); if (parser.getEventType() != XmlPullParser.START_TAG) { throw new IllegalStateException("Parser not in proper position, or bad XML."); } boolean done = false; while (!done) { int eventType = parser.next(); if ((eventType == XmlPullParser.START_TAG) && ("agent".equals(parser.getName()))) { statusRequest.agents.add(parseAgent(parser)); } else if (eventType == XmlPullParser.END_TAG && "agent-status-request".equals(parser.getName())) { done = true; } } return statusRequest; }
public IQ parseIQ(XmlPullParser parser) throws Exception { AgentStatusRequest statusRequest = new AgentStatusRequest(); if (parser.getEventType() != XmlPullParser.START_TAG) { throw new IllegalStateException("Parser not in proper position, or bad XML."); } boolean done = false; while (!done) { int eventType = parser.next(); if ((eventType == XmlPullParser.START_TAG) && ("agent".equals(parser.getName()))) { statusRequest.agents.add(parseAgent(parser)); } else if (eventType == XmlPullParser.END_TAG && "agent-status-request".equals(parser.getName())) { done = true; } } return statusRequest; }