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

Home Posts Topics Members FAQ

XmlSchema.Read not creating the SOM

I'm using the following code to create an XmlSchema from an XSD file. The Read() method doesn't throw any errors and after I write the schema to a file, it looks as expected

However, after the Read() method is called, m_Schema still contains no items

What am I doing wrong? My .xsd file validates fine in XMLSpy

// Code follow
System.Xml.XmlTextReader m_XMLReader = new System.Xml.XmlTextReader(m_SchemaLocation)
System.Xml.Schema.XmlSchema m_Schema = System.Xml.Schema.XmlSchema.Read(m_XMLReader, null)

System.Xml.XmlTextWriter m_Writer = new System.Xml.XmlTextWriter("schema.xsd",System.Text. Encoding.UTF8)
m_Schema.Write(m_Writer)
m_Writer.Close()

Nov 12 '05 #1
0 1162

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

Similar topics

2
9056
by: AlexS | last post by:
Hello, I have error when reading schema using XmlSchema. Read and then .Compile: System.Xml.Schema.XmlSchemaException: May not be nominated as the {substitution group affiliation} of any...
0
943
by: Sinic101 | last post by:
I'm using the following code to create an XmlSchema from an XSD file The Read() method doesn't throw any errors and after I write the schem to a file, it looks as expected. However, after the...
4
7103
by: Stefan Rotter | last post by:
Hi, I'm trying to load a schema into an XmlSchema object with the Read and Compile methods. I use Read with a ValidationEventHandler. No errors occurs but when I look at the XmlSchema properties...
2
1886
by: Alex Shirshov | last post by:
Hello, All! It seems the bug (http://groups.google.com/groups?hl=ru&lr=&ie=UTF-8&threadm=a53b01c28a00%242 08bc860%2439ef2ecf%40TKMSFTNGXA08&rnum=8&prev=/groups%3Fq%3DschemaLocation%2...
0
1328
by: John | last post by:
Hi, I'm creating a component to generate a schema file much like VS generates for DataSets. I'm using XmlSchema to do the job and I also am using a XmlNamespaceManager to manage namespaces. ...
1
1370
by: SideByEach | last post by:
If I wanted to find the type referenced in this XML's root node, what object would I use in the SOM? <xs:schema xmlns="http://www.w3.org/1999/XSL/Transform"elementFormDefault="qualified" ...
0
1401
by: sudha | last post by:
I need to read an xml file which has xmlschema in it to create a csv file. I need to generate column names from xmlschema. How should I read xmlschema inside the xml file to generate columnnames?...
1
1553
by: hemendravyas | last post by:
Please help out in following code snippet: For the first time it gives prompt while XmlSchema.Read(). Second time schema_collection_object is not null and so does not enter into this block of...
0
2020
by: =?Utf-8?B?TGFzdGJ1aWxkZXJz?= | last post by:
Hi all, I have a weird problem which has been causing me a headache for the last two days. I have to dynamicly generate a schema in memory and load it into a dataset in memory to be returned...
0
7205
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
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
7468
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...
0
5596
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,...
0
3180
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
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
747
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
401
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.