multiple attributes 2003-01-29 - By Elena Litani
Peter Vanopulos wrote: > ===> I can not see a setAttribute() method that accepts a NamedNodeMap > as a parameter. Can you please post by example code.
I never said that such method exists. See Joe's reply on this subject.
> You can add attributes directly > to the org.w3c.dom.NamedNodeMap (which is retrieved via getAttributes()) > since this object is _live_ or you can use setAttribute* methods on > Element interface to add new attributes to the DOM. > ^^^ can you? Please post by > example.
Have you looked at the DOM APIs? If not please do so [1], also look at the DOM FAQ [2], and the DOM spec [3]. As I said on Element interface there are setAttribute* methods, i.e.
element.setAttributeNS("http://foo", "qualifiedName", "value"); element.setAttributeNS("http://foo", "qualifiedName2", "value2");
will result in 2 attributes on the "element" node.
[1] http://xml.apache.org/xerces2-j/javadocs/api/org/w3c/dom/package-summary.html [2] http://www.w3.org/DOM/faq.html [3] http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/
Thank you, -- Elena Litani / IBM Toronto
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
|
|