473,503 Members | 2,157 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XmlReader not using a schema when validating

I am setting up an XmlReader in .NET 2.0 beta2. I'm trying to migrate
away from the now deprecated XmlValidatingReader. The XML files I'm
reading have an in-line schema. I'm noticing several alarming problems:

1) The documentation for XmlReader says to use and XmlReaderSettings
object and to either add or remove IgnoreInlineSchema from the
ValidationFlags property as desired. Well, the ValidationFlags property
uses the XmlSchemaValidationFlags enumeration... which does not even
have IgnoreInlineSchema defined. It has ProcessInlineSchema. So, I go
ahead and add the flag since I want it to use the inline schema. Oh,
guess what... it doesn't actually apply the flags, so to get it to use
the inline schema, I have to adjust the boolean properties,
IgnoreInlineSchema, IgnoreValidationWarnings, etc. to get it to work.

2) However I decide to explicitly add schemas to my XmlReader's
Settings.Schemas (either through calling
XmlReaderSettings.Schemas.Add() or XmlReader.Settings.Schemas.Add()) it
does not use the schema. I keep getting Validation Warnings of "Could
not find schema information for the element 'Any'". My schema DOES in
fact have everything defined, and when I use the old 1.1 way of doing
things (XmlValidatingReader) everything validates as I expect it to.
So, is this a bug in XmlReader? Or is Microsoft now releasing betas
that are not feature complete? Is this beta testing or alpha testing?

3) On an unrelated note, I was under the impression that the validation
events in 2.0 were going to make res a public member instead of
private. So far, that is not the case, making ValidationEvents in 2.0
as inane and useless to developers as they were in 1.1!

Sep 26 '05 #1
0 1259

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

Similar topics

0
1745
by: RockyH | last post by:
Hello, I'm having a problem when trying to use the XmlReader.Create(nodeReader, settings) method to validate an XML document against a schema. The problem is that if there are multiple missing...
0
2207
by: Matthew Heironimus | last post by:
According to the XML 1.0 (Third Edition) W3C Recommendation (http://www.w3.org/TR/2004/REC-xml-20040204/#sec-line-ends) all #xD, #xA, and #xD#xA character combinations should be converted to a...
1
5339
by: Matthew Heironimus | last post by:
According to the XML 1.0 (Third Edition) W3C Recommendation (http://www.w3.org/TR/2004/REC-xml-20040204/#sec-line-ends) all #xD, #xA, and #xD#xA character combinations should be converted to a single...
1
2944
by: Andy | last post by:
I am having some trouble validating XML using the XmlValidatingReader. I have created some xml and used the visual studio to generate the schema. So I am confident that the xml and schema match. ...
1
2291
by: Wallace | last post by:
Hi all, I have a problem on validating a xml fragment using a single namespace schema which spread across multiple schema files using include in the master schema file. No matter how I change...
0
326
by: kinryuu | last post by:
I am setting up an XmlReader in .NET 2.0 beta2. I'm trying to migrate away from the now deprecated XmlValidatingReader. The XML files I'm reading have an in-line schema. I'm noticing several...
2
2114
by: srujana | last post by:
Hi I am validating an xml document against schema . when i am passing the xml file location as an input to the parse method String XmlDocumentUrl="E:/books.xml"; parser.parse(XmlDocumentUrl);...
1
7765
by: engwar | last post by:
The title says it all. How do I use XMLDocument.Validate() against a DTD. In all my Googling about this I only find examples of how to validate an XMLReader or XmlValidatingReader against a DTD....
0
2422
by: gpet44 | last post by:
Hi, I have a problem receiving XML over a NetworkStream in C# .Net 2.0/3.0. I'm creating an XMLReader from the stream. I get the following exception when the XmlReaderreads from the stream as...
0
7093
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
7287
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
7349
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
7467
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...
1
5022
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...
0
3177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3168
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
746
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.