The Artima Developer Community
Sponsored Link

Java Answers Forum
appendChild() throws DomException

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Srinivas

Posts: 6
Nickname: sbitla
Registered: Mar, 2002

appendChild() throws DomException Posted: Jun 23, 2002 8:16 PM
Reply to this message Reply
Advertisement
I want to append a newly created Attribute to an Element of an existing Document. When I do that the appendChild() throws DomException. Here is the code.

Document doc = this.getDocumentModel();
Node root = doc.getFirstChild();
XmlDocument xmlDoc = (XmlDocument) doc;
Attr attr = xmlDoc.createAttribute("CONFIRMMESSAGE");
attr.setNodeValue("");
xmlDoc.changeN odeOwner(attr);
root.appendChild(attr);

Why is it not working?

thanks,
Srinivas Bitla.

Topic: Moving a file to other directories Previous Topic   Next Topic Topic: pause in java

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use