Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes XML and Related Technologies and the fly likes Validation against DTD using SAX Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Validation against DTD using SAX" Watch "Validation against DTD using SAX" New topic
Author

Validation against DTD using SAX

Lars Franzen
Greenhorn

Joined: Nov 01, 2001
Posts: 4
Hi!
Does anyone have any example code when validate an XML file against a DTD when using SAX?
Lars Franzen
Greenhorn

Joined: Nov 01, 2001
Posts: 4
I find a solution, thanks any way!
Justin Chu
Ranch Hand

Joined: Apr 19, 2002
Posts: 209
    
    1
How??
How to validate a XML to a DTD through programming?
Chu
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
If you mean validating the XML document against a DTD, you can simply parse the document with validation turned on.
If you mean validating the syntax of the DTD itself, I don't know any such program.


Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Validation against DTD using SAX