473,320 Members | 1,804 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.

Error :The root element of a W3C XML Schema should be <schema>

Hi,
I am getting following error while validating xml file with schema using
ReaderSettings in .NET 2.0
"Line: 0 - Position: 0 - The root element of a W3C XML Schema should be
<schemaand its namespace should be 'http://www.w3.org/2001/XMLSchema'."
First few lines of xsd file are as follows:
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://schemas.keaneaustralia.com/Nts"
elementFormDefault="qualified"
targetNamespace="http://schemas.keaneaustralia.com/Nts" >
<xsd:element name="DeviceParameters" nillable="true"
type="tns:DeviceParameters" />
<xsd:complexType name="DeviceParameters">
<xsd:complexContent mixed="false">
<xsd:extension base="tns:DataElementOfDeviceParameter">
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded"
name="DeviceParameter" type="tns:DeviceParameter" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
.........
I am not able understand why the error is coming.Any help would be highly
appreiciated.I have searched high and low on internet but not able to find
any useful
Thanks in advance for replying(as always)
--
Hope this helps.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.

Dec 12 '07 #1
1 10273
Manish Bafna wrote:
I am getting following error while validating xml file with schema using
ReaderSettings in .NET 2.0
"Line: 0 - Position: 0 - The root element of a W3C XML Schema should be
<schemaand its namespace should be 'http://www.w3.org/2001/XMLSchema'."
First few lines of xsd file are as follows:
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://schemas.keaneaustralia.com/Nts"
elementFormDefault="qualified"
targetNamespace="http://schemas.keaneaustralia.com/Nts" >
It sounds to me as if your application is loading something supposed to
be a schema but in reality it loads something different. So double check
that you are really loading the schema you have shown.
You might also want to show us your code performing the validation.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Dec 12 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Robert Lintner | last post by:
Hi, I woult like to switch from DTD to XML-Schema and am looking for an equivalent to external ENTITY for composition of an xml file from modules --- my.dtd -- <?xml version="1.0"...
0
by: Dan Bolser | last post by:
I would like to make an RDB from XML, how can I automatically create an RDB schema from an XML schema? Am I asking the wrong question? Ta, Dan.
3
by: Kimmo J?rvikangas | last post by:
Dear XML (Schema) experts, As an example I have the following schema: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"...
0
by: Stoggers | last post by:
Hi, Anyone got any examples of XSLT to translate a schema into another schema? I need to change the datatype on elements. Thanks, Stoggers.
2
by: Brad Quinn | last post by:
Lets say I have an XmlNode that validates against some schema. I also have a class that was generated by the xsd tool using said schema. What is the best way to get from an XmlNode to an...
0
by: Andrea N. | last post by:
I'm new to .NET XML classes, so here my dilemma I really like the XMLDataDocument concept of synchronizing automatically XMLDocument and DataSet with a common schema. Can I automatically...
4
by: Sindarian | last post by:
This just seems like the most basic thing, but I can't find a simple description of this process anywhere and in here, everone is talking about going the other way :( I had .NET create an XML...
5
by: Jeff | last post by:
We are using .Net and the wsdl Utility to generate proxies to consume web services built using the BEA toolset. The data architects on the BEA side create XML schemas with various entities in...
5
by: markus.meier | last post by:
Hi, I'm searching a tool to generate XML files based on an existing XML schema file. Does somebody know a free tool that supports this feature? Thanks Markus
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...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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)...
0
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: 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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.