File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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
 
Don't get me started about those stupid light bulbs.
 
subject: Creat xml document with DOM, how do I add DTD information to it?
 
Similar Threads
Applet display problem in java 1.6
java.net.No Route To Host Exception: No route to host: connect
Out of memory error when opening an XML of size 18 MB
Validate XML Document
Regarding jackrabbit versionable node creation