Element element = ...; Attribute attribute = element.getAttribute("dim"); attribute.setValue( attribute.getValue().replace("dimension2", "") );
taskStatus.setValue("1000");
Document doc = Jsoup.parse(html); Elements e = doc.getElementsByTag("body"); Log.i("Span element: "+e.get(0).nodeName(), ""+e.get(0).nodeName()); e = e.get(0).getElementsByTag("span"); Attributes styleAtt = e.get(0).attributes(); Attribute a = styleAtt.asList().get(0); if(a.getKey().equals("style")){ String[] items = a.getValue().trim().split(";"); String newValue = ""; for(String item: items){ if(item.contains("COLOR:")||item.contains("FONT-SIZE:")){ Log.i("Style Item: ", ""+item); newValue = newValue.concat(item).concat(";"); } } a.setValue(newValue); Log.i("New Atrrbute: ",""+newValue); } Log.i("FINAL HTML: ",""+e.outerHtml()); doc.html(e.outerHtml()); }
img.removeAttr(toRemAttr); src.setValue(newSrcVal.toString());
channel.setValue("VAS Server"); userId.setValue(FreeUrlConfig.getUserId()); application.setValue(FreeUrlConfig.getApplication()); transactionId.setValue(transactionIdStr); catalogOfferId.setValue(FreeUrlConfig.getOfferId()); campaignId.setValue(FreeUrlConfig.getCampaignId()); msisdnAttr.setValue(msisdn.asUsername()); callPermissionFlowFlag.setValue(FreeUrlConfig.isCallPermissionFlowFlagActive() ? "Y" : "N");
Node person = nodeList.item(pos); Node fore = tra.getElementByNodeName(person, "id"); nameAttr.setValue("forename"); Node pre = tra.getElementByNodeNameWithAttribute(person,"name",nameAttr); nameAttr.setValue("surname"); Node sur = tra.getElementByNodeNameWithAttribute(person, "name", nameAttr); bean.setForeName(pre.getTextContent());