473,396 Members | 2,140 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,396 software developers and data experts.

Trying to understand why simple XML will not validate

I've been working on learning XML schemas and trying to
make use of the MS classes for validating data against a
schema.

So, I've been trying to work through some simple schemas
and instances. But, the parser inside of Visual Studio
seems to frequently validate against a cached version of
the schema.

Occassionally I have an XML file that won't validate
against the schema, which I'm sure is correct. I exit
VS.NET and open it [VS.NET] up again. Then the XML file
will validate without errors.

Am I doing something wrong? Or, is this just a quirk of
the parser inside VS.NET?

Nov 12 '05 #1
1 1423
Ron,

It's a quirk. I think its a bug, but it is by design to aid performance.
It's actually even uglier than you describe.

a) you have to (in at least some cases) close _all_ versions of Visual
Studio, not just the one you're working with
b) Visual Studio does not recognize the xsi:schemaLocaion in your document.
That is the schema that's used by default in a validating reader. Thus you
can easily have VS validate against a different schema than used at design
time.

You can search MSDN for "wish" and I think you'll find the best location to
report this as something to fix in Whidbey.

--
Kathleen Dollard
Microsoft MVP
Author "Code Generation in Microsoft .NET"
"Ron Rohrssen" <rl******@killspam.rockwellcollins.com> wrote in message
news:07****************************@phx.gbl...
I've been working on learning XML schemas and trying to
make use of the MS classes for validating data against a
schema.

So, I've been trying to work through some simple schemas
and instances. But, the parser inside of Visual Studio
seems to frequently validate against a cached version of
the schema.

Occassionally I have an XML file that won't validate
against the schema, which I'm sure is correct. I exit
VS.NET and open it [VS.NET] up again. Then the XML file
will validate without errors.

Am I doing something wrong? Or, is this just a quirk of
the parser inside VS.NET?

Nov 12 '05 #2

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

Similar topics

27
by: Brian Sabbey | last post by:
Here is a first draft of a PEP for thunks. Please let me know what you think. If there is a positive response, I will create a real PEP. I made a patch that implements thunks as described here....
6
by: Mark Jerde | last post by:
We have developed about 80 XML documents, each probably 150 lines long, that are all supposed to conform to a schema. My understanding is the way to show that an XML document conforms to a schema...
2
by: Crimsonwingz | last post by:
Trying again for understanding and comprehension. Simple database. Name, birthday, age. Name and birthday are provided. From a form (yes, I need to do it this way), I would like to click a...
12
by: Ron Weldy | last post by:
I have a test server runinng 2003/IIS 6 with a mixture of asp and asp.net files. On my workstation I have a share set up to the folder where the web files reside. I am just doing quick and dirty...
18
by: Q. John Chen | last post by:
I have Vidation Controls First One: Simple exluce certain special characters: say no a or b or c in the string: * Second One: I required date be entered in "MM/DD/YYYY" format: //+4 How...
0
by: antonyliu2002 | last post by:
The full code is pasted below. It looks scarily long, but it's pretty simple. It is adapted from a sample code at MSDN. If you run it, and check it out from your browser, you'll see: ...
12
by: Jim Anderson | last post by:
This is my first attempt at XML documentation. I'm trying to get started with docbook so I can put a set of documentation into docbook tags. I'm using 'XML In A Nutshell" and "DocBook The...
11
by: TokyoJ | last post by:
I run a small camp in Alaska for kids and my director is asking for a web form. Could someone please have a look and offer some advice on where I'm making mistake(s)? I'm using the RegExp function...
0
by: Marc Scheuner | last post by:
Folks, I'm faced with a dilemma here - I have an XML document and for part of it, I have an XSD schema to validate it - but not for the rest of it. Can I still validate at least part of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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,...

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.