• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is no

 
gowtham thurangi
Greenhorn
Posts: 13
Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Every one,


In my servlet am using DOM to create a xml file . But it is showing an error like

org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted.

Please any one help me.
Thanks
.
 
Paul Clapham
Sheriff
Pie
Posts: 20980
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This sometimes happens when you try to add a node to a document, but the node actually belongs to some other document (or doesn't belong to any document at all). If that's your problem, then check out the API documentation for Document, and you'll see there's a method which allows you to import (I think that's the word) a node into a document. Once you've done that, you can then add it wherever you like in that document.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic