CSharp/C# >> Looking for some sample codes in C#

by JoeZ » Wed, 28 Feb 2007 00:10:48 GMT

Hi all,

I am looking for some sample codes in C#, in which, it can read a schema xsd
file and use it to validate an xml stream or file. Ideally the sample will
use XmlValidatingReader.



CSharp/C# >> Looking for some sample codes in C#

by Matt Lacey » Wed, 28 Feb 2007 00:22:36 GMT

Try this:
FileStream fs = File.Open("../../signatureinstance.xml",
XmlTextReader reader = new XmlTextReader(fs);
XmlValidatingReader xvr = new XmlValidatingReader(reader);
xvr.ValidationType = ValidationType.Schema;
xvr.Schemas.Add(null, "../../signatureschema.xsd");
xvr.ValidationEventHandler += new
XmlDocument xdoc = new XmlDocument();

Courtesy of:

Or, you could try here:

Similar Threads

1. I'm looking for RasDial code sample in C#

2. Looking for sample code

3. Creating a Database using the STL: Newbie looking for code samples

4. Delphi 7, Excel - have problem - looking for sample code - Delphi VCL Component

5. looking for code sample for non-blocking TCP sockets


I need a code sample for doing this:

-  support for multiple agents that know each other and can talk each other
   over a non-blocking TCP socket.
   each agent can send and recieve data to/from each other.
-  handling agent down events (i don't know how to do it in an elegant way 
when using the socket select method).

I prefer to use the Socket.Select method.
All the socket operations must be in a non-blocking mode.


6. Looking for WinSNMP sample code

7. Looking for sample code to send email with exchange

Does anybody have sample code to send email using exchange from an MFC


Tom G

8. looking for custom control sample code