This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Checking XML against DTD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Checking XML against DTD" Watch "Checking XML against DTD" New topic

Checking XML against DTD

I Ritchie

Joined: Sep 14, 2003
Posts: 7
Is there a class within the Java API that will allow me to check whether an XML Document conforms to a DTD?
Thanks in advance.
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
This ("how to validate an XML document against DTD") has been asked before. Many times. If you'll search this forum, you'll find plenty of answers to your question.

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
I agree. Here's the link:
subject: Checking XML against DTD
Similar Threads
java.util.Properties loadXMLFile()
while loadding i am getting error
HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is no