Android Utililty Methods XML Node Set

List of utility methods to do XML Node Set

Description

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

Method

voidsetTextContent(Node n, String s)
set Text Content
n.appendChild(d.createTextNode(s));
voidsetTextContent(Node node, String string)
set Text Content
node.appendChild(node.getOwnerDocument().createTextNode(string));
voidxmlUpdateNodeValue(String filename, String nodeName, String unitName, float ratio)
xml Update Node Value
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.getFirstChild()
            .getNodeValue()) * ratio);
    if (node.getFirstChild().getNodeValue().contains(unitName)) {
...