@Override public void setAttribute(final String name, final String value) { checkNotNull(name); if (value != null) { element.setAttribute(name, value); } else { element.removeAttribute(name); } }
@Override public XMLPacket addChild(final String name, final String namespace) { final Element newElement = document.createElement(checkNotNull(name)); if (namespace != null) { newElement.setAttribute("xmlns", namespace); } element.appendChild(newElement); return new XMLPacketImplGWT(newElement); }
protected XMLPacketImplGWT(final String name, @Nullable final String namespace) { document = XMLParser.createDocument(); element = document.createElement(name); if (namespace != null) { element.setAttribute("xmlns", namespace); } document.appendChild(element); }
public void valueChanged(Object node, int columnIndex) { Element element = nodes.get(node); element.setAttribute(getAttributeName(columnIndex), getAttributeValue(node, columnIndex)); updateTextArea(); }
public void nodeAdded(Object parent, Object node, int index) { Element parentNode = nodes.get(parent); Element childNode = document.createElement("event"); for (int i = 0; i < model.getColumnCount(); i++) { childNode.setAttribute(getAttributeName(i), getAttributeValue(node, i)); } parentNode.appendChild(childNode); nodes.put(node, childNode); updateTextArea(); }