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 XmlDebugPanel(TreeTableModel model) { this.model = model; nodes = new IdentityHashMap<Object, Element>(); document = XMLParser.createDocument(); root = document.createElement("debug-panel"); initWidget(textArea = new TextArea()); textArea.ensureDebugId("debug-panel-xml"); textArea.setStyleName(Utils.style() + "-xml"); // Build the XML document based on the current state. document.appendChild(root); nodes.put(model.getRoot(), root); build(model.getRoot()); model.addTreeTableModelListener(this); }
try { Element databaseConnection = document.createElement( DATABASE_CONNECTION ); document.appendChild( databaseConnection );