Advertisement

12.15.2006 at 11:57AM PST, ID: 22094978
[x]
Attachment Details

How to associate an xsd schema with an xml document using c# and xml

Asked by scope_creep in Extensible Markup Language (XML)

Tags: xsd, xml, schema, associate

Hello,
I'm trying to use c# to associate a xml document with a xsd schema. I'm using the c# code which is lifted from help but when I use the debugger
nothing happens.

           Path = XMLPath + "\\" + XMLFile;

           
            XmlReaderSettings settings = new XmlReaderSettings();
            settings.ValidationType = ValidationType.Schema;
            settings.Schemas.Add("urn:engine-schema", "c:\\Engine\\ruleset.xsd");
            settings.IgnoreComments = true;


            settings.ValidationEventHandler += new ValidationEventHandler(RuleFileValidationHandler);

            XmlReader xvr = XmlReader.Create(Path, settings);


Any help would be much obliged.

Bob.Start Free Trial
[+][-]12.17.2006 at 03:41AM PST, ID: 18154346

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.21.2006 at 06:16AM PST, ID: 18180371

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.21.2006 at 10:11AM PST, ID: 18182118

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Extensible Markup Language (XML)
Tags: xsd, xml, schema, associate
Sign Up Now!
Solution Provided By: x4u
Participating Experts: 1
Solution Grade: A
 
 
[+][-]12.22.2006 at 06:18AM PST, ID: 18186948

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.22.2006 at 11:50AM PST, ID: 18189088

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32