When you request an embedded resource you need to ask for the file using the original file name as well as the namespace.
Use Reflector to determine what the ultimate fully qualified resource name is if you have trouble.
You can poke around in the document if you like, while the validation happens, but when I'm just validating I do a while(reader. I load the most-leaf node to load whole spec: I wanted an assembly that was self-contained and would hold all 64 of these XSD files internally as resources, and I didn't want to put them in a temp directory.
I added all the schemas to the project, right clicked "Properties" and set them all to Embedded Resources.
Finally, the exam tests your ability to validate XML to confirm that it conforms to a proper format. NET Framework includes several means of validating XML that you should be familiar with. NET Framework effectively unless you're familiar with XML.
That's true even if you're working only with desktop applications, but if you want to write XML Web Services and other distributed applications, XML knowledge is even more important. NET Framework uses XML for many purposes itself, but it also makes it very easy for you to use XML in your own applications.
The validation code in C#: Rather than using the XDocument.
Edit: I'm trying Mehrdad's tip, but I'm having trouble. Validation Event Handler = new Validation Event Handler(/*trouble is here*/); Xml Reader validating Reader = Xml Reader.
To pass this section of the exam, you need to know how to read an XML file from disk, and how to create your own XML from a object in your application.
You also need to be familiar with the XPath query language, and with the creation and use of XSD schema files.
Following is how you'd do that: Create XSD from XML this helps.
--EDIT-- This is upon John's request, please see updated code using non deprecated methods: Your code to extract the schema location looks weird.