• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

XML question.. plz help :-)

 
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI e'body,

Well my question is, do we have to mention an XML schema or DTD file in every XML file, for the purpose of validation?? Is it really required..?? or it can be commented or removed.??

something like...




Will it be fine, just like how i commented..??
what is the main purpose of Validation, in an XML file..???

This XML file is not playing any role with web-services.. just a normal XML file, created by hibernate, i guess.. (working on somebodys code and trying to understand)
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by prashant Kakani:
Well my question is, do we have to mention an XML schema or DTD file in every XML file, for the purpose of validation?? Is it really required..?? or it can be commented or removed.??


No, you don't have to have an XML Schema reference or a DOCTYPE definition in every XML file. If you think you don't need validation, you don't have to write a DTD or XML Schema document.
 
Jack Daniel
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
 
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But I think it's very healthy to have schema
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!