473,772 Members | 2,965 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.keaneau stralia.com/Nts"
elementFormDefa ult="qualified"
targetNamespace ="http://schemas.keaneau stralia.com/Nts" >
<xsd:element name="DevicePar ameters" nillable="true"
type="tns:Devic eParameters" />
<xsd:complexTyp e name="DevicePar ameters">
<xsd:complexCon tent mixed="false">
<xsd:extensio n base="tns:DataE lementOfDeviceP arameter">
<xsd:sequence >
<xsd:element minOccurs="0" maxOccurs="unbo unded"
name="DevicePar ameter" type="tns:Devic eParameter" />
</xsd:sequence>
</xsd:extension>
</xsd:complexCont ent>
</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 10403
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.keaneau stralia.com/Nts"
elementFormDefa ult="qualified"
targetNamespace ="http://schemas.keaneau stralia.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
3332
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" encoding="ISO-8859-1"?> <!ENTITY module1 SYSTEM "module1.xml"> <!ENTITY module2 SYSTEM "module2.xml"> .....
0
1243
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
4563
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" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="ROOT_ELEMENT"> <xs:complexType> <xs:choice>
0
1175
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
2224
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 instance of the class?
0
1142
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 syncronize 2 XMLDocument with Synchronization Trasformation Schema in the middle? Here my plan I'm going to write an application which the core data model is based on XMLDataDocument with my own schema. The application frontend will edit the...
4
1883
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 Schema file (xsd) for a table in my database. I then create a DataSet that contains 1 row of data from that same table. I want to use this DataSet along with the Schema file to create an XML file that ACTUALLY CONTAINS THE DATA. Simple huh: DataSet +...
5
5402
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 separate files for ease of maintainability. These schemas are all part of the same namespace. When defining a web service that access more than one of these entities, the wsdl file generated by BEA contains multiple schema elements with the same...
5
3649
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
9620
marktang
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10104
jinu1996
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9912
tracyyun
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8934
agi2029
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6715
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.