Connecting Tech Pros Worldwide Forums | Help | Site Map

XmlSchema.Read not creating the SOM

Sinic101
Guest
 
Posts: n/a
#1: Nov 12 '05
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()


Closed Thread


Similar .NET Framework bytes