469,572 Members | 1,213 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,572 developers. It's quick & easy.

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 1288
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

27 posts views Thread by Brian Sabbey | last post: by
6 posts views Thread by Mark Jerde | last post: by
12 posts views Thread by Ron Weldy | last post: by
18 posts views Thread by Q. John Chen | last post: by
reply views Thread by antonyliu2002 | last post: by
12 posts views Thread by Jim Anderson | last post: by
reply views Thread by Marc Scheuner | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.