Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why does the IE or google chrome does not throw error if the xml file does not follow the xmlschema?

 
Guy Emerson
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

There is a little confusion as to why does the IE or google chrome does not throw error if the xml file does not follow the xmlschema? let me cite an example:----

country.xsd



The xml document generated based on this schema is as follows:---


country.xml






The xml document is not following the rules prescribed but still the browser does not show any error. Why?? It should have shown some error that the xml document does not follow the ruled defined in the schema.

Could you please clarify??

regards

Guy
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65111
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What makes you think that the browser will bother validating the XML?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Browsers are notorious for trying to render incorrect HTML so you should not be surprised that they also try to cope with XML that way.

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic