473,574 Members | 3,213 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML Validation using XSD in IE 6.0

3 New Member

My Xml is not getting correctly validated against the XSD.
I expect the browser to through atleast some kind of generic error messages.But it is not happening.I have installed MSXML4 in my PC

My Xml file is below


Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0"?>
  2. <note
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:SchemaLocation="note.xsd">
  5. <from>Jani</from>
  6. <heading>Reminder</heading>
  7. <body>Don't forget me this weekend!</body>
  8. </note>
I purposefully removed the <to> tag from the above xml to see some errors.

My Xsd file is below
Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0"?>
  2. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  3. targetNamespace="http://www.w3schools.com"
  4. xmlns="http://www.w3schools.com"
  5. elementFormDefault="qualified"><xs:element name="note">
  6.     <xs:complexType>
  7.       <xs:sequence>
  8.     <xs:element name="to"  type="xs:string" />
  9.     <xs:element name="from" type="xs:string"/>
  10.     <xs:element name="heading" type="xs:string"/>
  11.     <xs:element name="body" type="xs:string"/>
  12.       </xs:sequence>
  13.     <xs:attribute name="to" type="xs:string" use="required"/>
  14.     </xs:complexType>
  15. </xs:element></xs:schema>
Both the note.xml and note.xsd files are in the same folder.
Can somebody guide why i am not getting any error?
Jan 21 '09 #1
8 8267
7 New Member
There is no "to" element in your xml. what ever sequence you mentioned in XSD, they must be in XML. Also in your xsd, you mentioned "to" is required, but the same is not available in xml. how can u expect that ur xml will be validated????
Jan 21 '09 #2
3 New Member
You are correct Satyam.
There is no <To> element in Xml.I purposefully removed it
So browser should throw me an error.
I am not getting any error.Why?
Jan 21 '09 #3
8,658 Recognized Expert Moderator Expert
validating XSD with IE seems not to be the easiest thing to do.... found some (maybe) useful links on google.
XML Schema Validation in the Microsoft Universe (last third)
Jan 21 '09 #4
2,057 Recognized Expert Top Contributor
Could you show us the code you are using to validate your xml?

Or are you expecting (incorrectly) that IE will validate your xml upon opening of the xml file in it?
Jan 21 '09 #5
3 New Member
Hi Young

Thank for the response
Yes I am expecting that IE will validate the Xml upon opening of the xml file in it.Why? it is not possible?if possible can u tell me the way
Jan 22 '09 #6
8,658 Recognized Expert Moderator Expert
sorry, but.... it's IE after all (in my opinion the worst browser available). it doesn't even handle XHTML!
Jan 22 '09 #7
2,057 Recognized Expert Top Contributor
IE 6 doesn't automatically validate the xml; it just renders what it gets. You need to explicitly tell it to do so through indirect opening of the xml using other code.
Jan 22 '09 #8
5,058 Recognized Expert Expert
I am no XML expert (by far), but..
Why would you want to validate this with IE6?

Surely there is a better tool for this than a browser, released 7 years ago, which was at the time of it's release like 10 years behind on pretty much everything...
Jan 27 '09 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Stefan Richter | last post by:
Hi, after coding for days on stupid form validations - Like: strings (min / max length), numbers(min / max value), money(min / max value), postcodes(min / max value), telefon numbers, email adresses and so on. I thought it might be a better way to programm an automated, dynamic form validation that works for all kinds of fields, shows the...
by: wumingshi | last post by:
Hi, When validating an XML instance, sometimes the schema is not enough to expression the validation rules. Additional validation rules may be expressed in an application-specific way. For example, using XPath or Java method. So is there a concept and/or standard for post-schema validation or application validation? Is there any hook in XML...
by: Gérard Talbot | last post by:
Cross-posted to: comp.infosystems.www.authoring.html and alt.html Followup-to: comp.infosystems.www.authoring.html 1- One day, I stumbled across a website that offers to validate webpages. What was really special about that site is that the validation service was available in Russian, German, Spanish and English. Now, I can't find this site...
by: | last post by:
Hello Guys, I am using the validation controls to validate my data. But the problem is "The page is still being posted to server". I want to get rid of the round trips to server. Are there any get arounds for this problem apart from the traditional JavaScript?
by: Stephen | last post by:
Hi, the validation controls dont work on Netscape or Mozilla and only on Internet Explorer why? How do i correct this problem? Thanks
by: Barbara Alderton | last post by:
I setup some standard Required Field Validation controls and one Custom validation control on an ASP.NET page (within a user control) to validate text entry. I also setup a Summary Control to post all the messages to a message box (ShowMessageBox=true). The required field validation error messages show up in the summary just fine but I can't...
by: Bill Long | last post by:
I have a control that simply displays a list of links. Following one of the links doesn't post back or redirect to another page, it simply hides the current panel and shows the one you selected... So the behavour is similar to a tab control. The user is expected to fill out required data on each of the panels before pressing a submit button...
by: Tim Frawley | last post by:
Source code attached indicates my problem with validation and a button bar save button. Fill the Textbox with some text then tab off the control. The message box will display the text in the textbox from the Validating event. Now put the focus back on the textbox click the button bar button. Nothing happens. The form causes validation...
by: Marcin Cenkier | last post by:
Hi, I want to validate a DOM document, and if I build DOM from a stream using documentBuilder.parse() validation using validator.validate(DOMSource) works, but if I create the same document manually then validation throws an exception: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element ....
by: John Chan | last post by:
Hi, Im doing a maintenance application in ajax and coldfusion at work on IE6 exclusively. I have a save button on each form and i have to do various validations server side and on client side when the user clicks save i.e check that user exists in table, check users password is the same as password in table, check password is valid, check...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.