This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply 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: 56194
    
  13

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


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12268
    
    1
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

Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: why does the IE or google chrome does not throw error if the xml file does not follow the xmlschema?
 
Similar Threads
Help me for xsd creation
XML schema fails to load
servlets and xml
problem with schema program
namespace