Android Utililty Methods XML Element Set

List of utility methods to do XML Element Set

Description

The list of methods to do XML Element Set are organized into topic(s).

Method

voidsetText(Element parentNode, String data)
Sets data to be the TEXT content of element
if (data == null)
    return;
Text txt = getTextNode(parentNode);
if (txt != null)
    txt.setData(data);
else {
    txt = parentNode.getOwnerDocument().createTextNode(data);
    parentNode.appendChild(txt);
...
voidxmlUpdate(String filename, String nodeName, String nodeAttribute, String unitName, float ratio)
xml Update
Document docment = load(filename);
Element element = docment.getDocumentElement();
NodeList items = element.getElementsByTagName(nodeName);
for (int i = 0; i < items.getLength(); i++) {
    Element node = (Element) items.item(i);
    int result = (int) (getNumber(node.getAttribute(nodeAttribute)
            .toString()) * ratio);
    if (node.getAttribute(nodeAttribute).toString()
...