• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to validate an XML using DTD in Dom parser

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
It was the best of times. It was the worst of times. It was a tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic