473,320 Members | 1,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

XML Validation using XSD in IE 6.0

Friends

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

note.Xml

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
note.xsd
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 8256
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
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
Dormilich
8,658 Expert Mod 8TB
validating XSD with IE seems not to be the easiest thing to do.... found some (maybe) useful links on google.
http://bytes.com/groups/xml/628519-v...ie-never-fails
XML Schema Validation in the Microsoft Universe (last third)
Jan 21 '09 #4
jkmyoung
2,057 Expert 2GB
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
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
Dormilich
8,658 Expert Mod 8TB
@anilthuruthy
sorry, but.... it's IE after all (in my opinion the worst browser available). it doesn't even handle XHTML!
Jan 22 '09 #7
jkmyoung
2,057 Expert 2GB
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
Atli
5,058 Expert 4TB
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

21
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...
2
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...
41
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...
4
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...
6
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
2
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...
9
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......
2
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...
2
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...
1
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.