Windows Develop Bookmark and Share   
 index > Windows Forms General > validating xml without specifying xsd location in xml
 

validating xml without specifying xsd location in xml

Hi,

I have an xml and an xsd. I dont want to specify xsd file name in my xml, because for some reason it is giving me some problem accessing xml. 

So, I dont have this line in my xml

xsi:noNamespaceSchemaLocation="address.xsd"


How can I do the validation of xml through my code according to some xsd? 

So in my code I might first load the xml in some object, then I would load the xsd on some object, then i would pass the object with xml in it and object with xsd in it as parameter to some method that would do the validation for me. 

Thanks, 
MigrationUser 1  Tuesday, February 08, 2005 9:41 AM
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconxsdvalidationwithmultipleschemas.asp
MigrationUser 1  Friday, February 11, 2005 3:18 AM
Thanks,

Can I validate whole document instead of going noded by node inside  a while loop ??

vr.Schemas.Add(null,strXSD);
vr.ValidationEventHandler +=new ValidationEventHandler(vr_ValidationEventHandler);
while(vr.Read())


I dont need while there, I want to validate the whole document without loop and getting a bool value that tells whether or not the document was validated against the xsd.

Thanks,




MigrationUser 1  Tuesday, February 22, 2005 3:39 PM

You can use google to search for other answers

Custom Search

More Threads

• Simple open source utility for generating simple reports
• Mouse cursor control problem
• Windows Webforms and additional DLLs
• MouseLeave event from panel fires for one control within panel but not another control
• Adding listbox like control to Outlook Calendar Look and Feel Sample
• Flickering a lot
• unpopulated Textbox
• SStab control
• Make Listview is readonly
• Unhandled exception using webBrowser