This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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?
 
Similar Threads
Regarding jackrabbit versionable node creation
Out of memory error when opening an XML of size 18 MB
java.net.No Route To Host Exception: No route to host: connect
Validate XML Document
Applet display problem in java 1.6