当我想让一个 web 服务停止应用程序时,我遇到了一个问题,不是有什么想法吗?
private String dumpTagData(Parcelable p) {
StringBuilder sb = new StringBuilder();
Tag tag = (Tag) p;
byte[] id = tag.getId();
sb.append("ID Producto:").append(getDec(id)).append("\n");
ArrayList<HashMap<String, String>> menuItems = new ArrayList<HashMap<String, String>>();
XMLParser parser = new XMLParser();
String xml = parser.getXmlFromUrl(URL); // getting XML
Document doc = parser.getDomElement(xml); // getting DOM element
NodeList nl = doc.getElementsByTagName(KEY_ITEM);
// looping through all item nodes <item>
// creating new HashMap
HashMap<String, String> map = new HashMap<String, String>();
Element e = (Element) nl.item(0);
// adding each child node to HashMap key => value
sb.append("Nombre:").append(parser.getValue(e, KEY_NAME)).append("\n");
sb.append("Costo:").append(parser.getValue(e, KEY_COST)).append("\n");
sb.append("Descripción:").append(parser.getValue(e, KEY_DESC)).append("\n");
sb.delete(sb.length() - 2, sb.length());
return sb.toString();
}