aspose file tools*
The moose likes XML and Related Technologies and the fly likes Creat xml document with DOM, how do I add DTD information to it? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Creat xml document with DOM, how do I add DTD information to it?" Watch "Creat xml document with DOM, how do I add DTD information to it?" New topic
Author

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

ZhiYuan Lin
Ranch Hand

Joined: Jun 30, 2003
Posts: 44
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

Joined: May 29, 2003
Posts: 1258
You did just that! That's why it gave you the error.


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creat xml document with DOM, how do I add DTD information to it?