Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to validate an XML using DTD in Dom parser

 
Priya Sri
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

My requirement is like this :

A pdf will be submitted by the end user. The data will be passed to servlet as an xml request. We should use Dom Parser and get the fields from the xml request and to be stored in tables.

In my servlet, how to validate an XML using a DTD???

I have seen a part of code like this to validate xml using DTD :



Suppose I have specified the dtd name as book.dtd in the xml with the line like below


where will this book.dtd to be stored??
1. is it at WSAD server where the servlet runs?
If so, how to specify the path in servlet that validate this xml using this dtd which resides in this location??

Thanks in Advance
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic