private ArrayList<RemoteObject> deserializeArrayAsXml(String queryScope, String input) { ArrayList<RemoteObject> objects = new ArrayList<RemoteObject>(); XmlParser parser = new XmlParser(input); XmlElement parent = ((XmlElement) parser.parse( HttpAdapter.createResponseWrangling(queryScope, this).getCollectionSelector(), XmlElement.class)) .getParent(); for (int i = 0; i < parent.getChildCount(); i++) { objects.add(deserialize(queryScope, new XmlParser(parent.get(i)))); } return objects; }
private Parser createXmlParser(String queryScope, String input) { Parser parser = new XmlParser(input); if (!HttpAdapter.createResponseWrangling(queryScope, this).getRecordSelector().isEmpty()) { ((XmlParser) parser) .setRootElement( parser.parse( HttpAdapter.createResponseWrangling(queryScope, this).getRecordSelector(), XmlElement.class)); } return parser; }