473,322 Members | 1,671 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,322 software developers and data experts.

Schema Editor Problems in VS.NET

I have an XML document and a schema. It validates fine, but when I try to
switch to data view there's a problem. So I tried "Create Schema" and got
the error:
An error occurred while loading the schema with targetNameSpace
"http://tempuri.org/XMLFile1.xsd" referenced in this document.
Index (zero based) must be greater or equal to zero and less than the size
of the argument list.

I can't find any help on this error, or see any reason why it should
occurring.

I've made this as simple as I can and I just can't see where the problem is
occurring.

Andy D

My XML is:

<?xml version="1.0" encoding="utf-8" ?>
<Names xmlns="http://tempuri.org/XMLFile1.xsd">
<name>Andy</name>
<name>Bob</name>
<name>Charles</name>
<name>Derek</name>
</Names>

my XSD is:

<?xml version="1.0" ?>
<xs:schema id="Names" targetNamespace="http://tempuri.org/XMLFile1.xsd"
xmlns:mstns="http://tempuri.org/XMLFile1.xsd"
xmlns="http://tempuri.org/XMLFile1.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-
microsoft-com:xml-msdata"
attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="Names" msdata:IsDataSet="true" msdata:Locale="en-
GB" msdata:EnforceConstraints="False">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="name" nillable="true"
type="xs:string"></xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
Nov 11 '05 #1
3 1491
Hi Andrew,

Thanks again for using Microsoft Newsgroup Support. I have sent your
question on to one of our support teams for a response. I will let you
know when I hear back from them.

Thanks for your patience.

Brett Keown
Microsoft Support
br*****@online.microsoft.com

This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 11 '05 #2
br*****@online.microsoft.com (Brett Keown [MSFT]) wrote in
news:$i**************@cpmsftngxa06.phx.gbl:
Hi Andrew,

Thanks again for using Microsoft Newsgroup Support. I have sent your
question on to one of our support teams for a response. I will let
you know when I hear back from them.

Thanks for your patience.


Just got back from a weekend away, worked out the problem - there was no
element defined. Being new to xsd I hadn't realised that I couldn't just
have a complex type with other complex types inside it.

However, it would have been nice if I'd been told "warning, you have no
root element" or if the schema creator had let me know in some way that one
was necessary.

Cheers,

Andy D
Nov 11 '05 #3
Great Andrew,

Glad to hear that you figured this out. I will submit a DCR asking that a notification message be put in for that type of error. Thanks again for using the
Microsoft Newsgroups!

Brett Keown
Microsoft Developer Support
br*****@nospam.microsoft.com

To email me directly, please remove the "nospam" from my email address.

This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use. © 2001 Microsoft Corporation. All rights reserved.

Nov 11 '05 #4

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

Similar topics

2
by: Michael Wein | last post by:
Hello, does anyone know of a tool that automatically anonymizes a DTD or XML Schema? By anonymizing I mean renaming all elements/type definitions but still containing the structure, esp. the...
4
by: Oskar Stuffer | last post by:
Hi! I'm using the msv tool which uses xerces to validate a XML document against a XML Schema definition. This is my XML Schema definition: <?xml version="1.0" encoding="ISO-8859-1"?>...
3
by: Xamle Eng | last post by:
I am looking for a data oriented schema-enforcing XML editor. By schema-enforcing I mean an editor that doesn't just have a button to verify the schema - I want an editor that actively enforces it...
1
by: mflll | last post by:
How does one say in one schema that one wants an element defined in another schema. For example, I want to include in the Employee definition, an Address element defined in the schema...
4
by: cmay | last post by:
I am beginning to wonder if it is not possible to get this working. I am trying to do: <root> <a/> <b/> <c/> </root>
5
by: hello | last post by:
How can I define the schema so that myage element has to be double or null? <xs:simpleType name="myage"> <xs:restriction base="xs:double"> <xs:enumeration value="null"/> </xs:restriction>...
3
by: Lord0 | last post by:
I *think* I need to be able to validate subsets of an XML document using different schema. The functionality I'm trying to implement is this. a) External suppliers produce an XML document...
5
by: Grant Robertson | last post by:
I am only just learning about schema basics. I am trying to understand some fundamental principles about what can be specified within a schema. If I define an enumerated list of values for an...
1
by: Johann Höchtl | last post by:
Hello! I am searching for a visual schema editor for eclipse. The only ones i came across was the altova XMLSpy and oxygen, both are commercial. Are there any good free editors available? Schema...
9
by: mstilli | last post by:
Hi, I am trying to use schema for server side validation using xerces to catch the validation errors. validating this XML: <Content4> <textarea13></textarea13>...
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
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...
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)...
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...
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.