A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Spring in Action
this week in the
XML and Related Technologies
validating a DTD in JAVA
Joined: Mar 30, 2004
Oct 24, 2006 01:18:00
I am using DOM parser to parse an XML in Java. Now, I want to validate this XML using an external DTD(by specifying the DTD file name in
not specifying in XML file) before parsing the XML.
Please guide me abt how to do that validation of XML that it conforms to the DTD given in java.
Thanks in Advance.
Joined: Dec 11, 2004
Oct 24, 2006 04:02:00
Please take some time to pick the correct forum for you question.
This forum is for
Moving to our XML and Related Technologies forum.
How to ask a question...
Simple Servlet Examples
Joined: Oct 02, 2006
Oct 25, 2006 03:37:00
HOpe the following code will help you
//parser.parse(new File(filename), handler);
builderFactory = DocumentBuilderFactory.newInstance();
Document document = builder.parse(new File("books.xml"));
I agree. Here's the link:
subject: validating a DTD in JAVA
path to dtd???xerces1.2.3
Setting DTD in SAX Parser
xml validation agains xsd
I need to Java code to validate xml file against dtd
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014