aspose file tools
The moose likes Web Services and the fly likes XML DTD Parsing Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "XML DTD Parsing" Watch "XML DTD Parsing" New topic
Author

XML DTD Parsing

Muthu Prasad
Greenhorn

Joined: Aug 04, 2005
Posts: 2
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
Marshal

Joined: Mar 22, 2005
Posts: 32767
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 ]

Android appsImageJ pluginsJava web charts
 
 
subject: XML DTD Parsing
 
Threads others viewed
Help needed in XML Parsing
Generic XML parsing
resolving external DTD
XML Validation using the java API
How can I parse a document with the DTD?
IntelliJ Java IDE