Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creat xml document with DOM, how do I add DTD information to it?

 
ZhiYuan Lin
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my code :


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

at org.apache.xerces.dom.CoreDocumentImpl.insertBefore(Unknown Source)

at org.apache.xerces.dom.NodeImpl.appendChild(Unknown Source)
........


Before, I use this code , it is worked :


But I want to add the DTD, how to do it ?

thanks!
[ October 11, 2004: Message edited by: Madhav Lakkapragada ]
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You did just that! That's why it gave you the error.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic