Hi all,
I am new to xml, could some one please tell me how to validate xml
against a DTD in java ? or even point me in the right direction ?
Thanks in advance,
Mithil
Andrew Thompson - 18 Jul 2007 02:14 GMT
...
>I am new to xml, could some one please tell me how to validate xml
>against a DTD ..
An XSD can check a lot more.
>..in java ?
Do you run Ant? An easy way to validate XML is
to use the Ant based XMLValidate task.
<http://ant.apache.org/manual/OptionalTasks/xmlvalidate.html>
>..or even point me in the right direction ?
Or alternately (for a stand-alone app.) you might look
into using the same functionality (code, API's) as the
Ant task. And that seems to be..
<http://java.sun.com/webservices/jaxp/>
HTH

Signature
Andrew Thompson
http://www.athompson.info/andrew/
Greg R. Broderick - 18 Jul 2007 07:18 GMT
Mithil <mithil.mohan@gmail.com> wrote in news:1184717717.891512.153280
@o11g2000prd.googlegroups.com:
> Hi all,
>
> I am new to xml, could some one please tell me how to validate xml
> against a DTD in java ? or even point me in the right direction ?
See the javadocs for javax.xml.parsers.DocumentBuilderFactory, especially the
setValidating() method.
Cheers!
GRB

Signature
---------------------------------------------------------------------
Greg R. Broderick usenet200707@blackholio.dyndns.org
A. Top posters.
Q. What is the most annoying thing on Usenet?
---------------------------------------------------------------------
Mithil - 23 Jul 2007 18:52 GMT
thanks Andrew and Greg, I will look at some of the docs and come back
to u guys if I need any more help.
Regards,
Mithil
Roedy Green - 23 Jul 2007 20:17 GMT
>I am new to xml, could some one please tell me how to validate xml
>against a DTD in java ? or even point me in the right direction ?
see http://mindprod.com/jgloss/xml.html

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com