List of utility methods to do XML Element Set
void | setText(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); ... |
void | xmlUpdate(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() ... |