Hello together I am building up a DOM from scratch, all works fine, except adding an attribute to a node Here is a small code snippet where I want to add the attribute to the node. Whats wrong here?? .... if(attributes) { myAttr = answerDocument.createAttribute(partialPath); myAttr.setValue("Attributes are stupid or not"); } else { element = answerDocument.getElementsByTagName(partialPath); } try { nodeFound = element.item(0); String xyz = nodeFound.getNodeName(); //if node does not exist throw exception nodeDoesExists = true; node = nodeFound; } catch(Exception e) { nodeDoesExists = false; if(attributes) { node.appendChild(myAttr); //add attribute to the node } .... Thanks in advance MarioReceived on Tuesday, 28 November 2000 02:11:02 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 October 2009 08:24:52 GMT