List of utility methods to do XML Node Set
void | setTextContent(Node n, String s) set Text Content n.appendChild(d.createTextNode(s)); |
void | setTextContent(Node node, String string) set Text Content node.appendChild(node.getOwnerDocument().createTextNode(string)); |
void | xmlUpdateNodeValue(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)) { ... |