Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

how to create a DTD rule for xml and Validate?



HI

The following formats of an sample XML Properties file.

<?xml version="1.0"?>
<config>
           
             <Request name="validateEmailRequest">
              <requestQueue>emailrequest</requestQueue>
              <responseQueue>response</responseQueue>
      </Request>

              <Request name="cleanEmail">
              <requestQueue>cleanrequest</requestQueue>
              <responseQueue>response</responseQueue>
      </Request>

</config>

pls tell me approach to design DTD for this sample xml file and also how i am able to validate this xml using java.

Thanks