aspose file tools*
The moose likes XML and Related Technologies and the fly likes why does the IE or google chrome does not throw error if the xml file does not follow the xmlschema? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "why does the IE or google chrome does not throw error if the xml file does not follow the xmlschema?" Watch "why does the IE or google chrome does not throw error if the xml file does not follow the xmlschema?" New topic
Author

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

Guy Emerson
Greenhorn

Joined: Dec 14, 2010
Posts: 27
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

Joined: Jan 10, 2002
Posts: 61762
    
  67

What makes you think that the browser will bother validating the XML?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why does the IE or google chrome does not throw error if the xml file does not follow the xmlschema?