• Post Reply Bookmark Topic Watch Topic
  • New Topic

XML DTD Parsing  RSS feed

 
Muthu Prasad
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello sir,
Now i am working with xml parsing how can i get information about DTD(either internal or Externl) in a xml file & how can i create a DTD in runtime. i am using JDK1.5.0 & Tomcat(xecres) for parsing.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're using DOM, you can call Document.getDoctype() to access the DTD, but it may not be much help, as the DocumentType javadoc explains. I'm not sure if JDOM or XOM provide more information. An external library like DTDParser might help.
Creating a DTD from an XML document is more involved; DTDGenerator should give you a good start.
[ August 06, 2005: Message edited by: Ulf Dittmer ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!