Java
Document doc = docBuilder.newDocument(); Attr attr = doc.createAttribute("name");
VisualBasic
Dim xmlDoc As New Msxml2.DOMDocument30 Dim newAtt As IXMLDOMAttribute Set newAtt = xmlDoc.createAttribute("name")
The example creates a document object and attribute object.
Attr createAttribute(String name) throws DOMException
Attr | The returned Attr object. |
name | The name for the created attribute. |
Sub createAttribute(name, mode) Returns IXMLDOMAttribute
name | The name for the created attribute. |
mode | The read / write mode for the created attribute. |
IXMLDOMAttribute | The returned Attr object. |