• 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

DTD

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I just wanted to verify this:
Does a DTD only validate an XML file while parsing it? For eg. an invalid XML file will be displayed in a browser with no error indication, but the error can be caught in a custom Java class while I am parsing it?

I am facing this issue right now, i.e. the browser displays the XML file with no issues even though its invalid. Just want to know if this is the normal behaviour.

Thanks.
Harsha
[ August 03, 2005: Message edited by: Harsha Pherwani ]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Browsers just display XML, they don't verify it (advanced browsers may optionally do that, but I'm not aware of one). You can validate using a Java parser, but you may have to turn on validation explicitly.
[ August 03, 2005: Message edited by: Ulf Dittmer ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic