Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with XSD Schema when reading XML
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
XML
Title:
Problem with XSD Schema when reading XML
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01294005
Message ID:
01294005
Views:
49
I thought this thing was working last night and I should have just retired at that point <g>, but now I am having a problem again.

Maybe someone sees what I am missing.

I am trying to load an XML into a dataset. I created XML, then created XSD Schema. Then I load the XML as following code:
DataSet dstEmailList;
dstEmailList.ReadXml(@cEmailListXmlFileName);
// The cEmailListXmlFileName has a valid XML file name.
The problem is that the above code ignores the XSD file completely. I tried to modify the XSD file entering some garbage but I get no error on the ReadXml. The main issue is that the data types are not set correctly in the dataset because they are specified in the XSD file, which is being ignored.

Here is the segment of the top of XML file where I specify the XSD:
<?xml version="1.0" encoding="utf-8" ?>
<EmailList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xsi:noNamespaceSchemaLocation="EmailList.xsd" >
Here is the top of the EmailList.xsd file:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
	<xsd:element name="EmailList">
Do you see anything wrong in the above code or the XML files?

Thank you in advance for any help.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Next
Reply
Map
View

Click here to load this message in the networking platform