Node newVal = xmlDoc.createElement(elementName); Node newValText = xmlDoc.createTextNode(elementValue); newVal.appendChild(newValText); addAttribute(xmlDoc, newVal, attrName, attrValue); node.appendChild(newVal);
Element newElem = doc.createElement(name); if (textValue != null) { newElem.appendChild(doc.createTextNode(textValue)); for (int i = 0; i < attributeNames.length; i++) { newElem.setAttribute(attributeNames[i], attributeValues[i]); parent.appendChild(newElem); ...
Element newNode = document.createElement(nodeName); for (int i = 0; i < attr_name_and_value.length; i += 2) { String attrName = attr_name_and_value[i]; String attrValue = attr_name_and_value[i + 1]; newNode.setAttribute(attrName, attrValue); parent.appendChild(newNode); return newNode; ...
Document doc = parent.getOwnerDocument();
Comment c = doc.createComment(str);
parent.appendChild(c);
return c;
Element e = d.createElement(name);
e.appendChild(d.createTextNode(value));
return e;
Element e = createElement(d, name); if (isCDATA) e.appendChild(createCDATA(d, value)); else e.appendChild(createText(d, value)); return e;
Element e = d.createElement(tagName);
return e;
Element result = createElement(doc, parent, depth, name);
createText(doc, result, contents);
return result;
Element e = doc.createElement(tagName);
parent.appendChild(e);
return e;
Element element = doc.createElementNS(elementNamespace, elementName);
return element;