Mike Hildner
Dec 14th, 2004, 11:12 AM
Fair warning - I'm new at this business.
I have an .xsd and an .xml file, the top of the xml looks like this:<?xml version='1.0' encoding='UTF-8'?>
<SleuthNameInfo
xmlns="http://sleuthsoftware.com/MasterNameLookup"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:SchemaLocation = "http://sleuthsoftware.com/MasterNameLookup SleuthNameInfo.xsd"
xsi:noNamespaceSchemaLocation="SleuthNameInfo.xsd"
ORI="NM1234567">
When I test the validation with XmlSpy, both xml and xsd files are in the same directory and all works fine. Now I want to upload to my web site and validate with .NET. I get this exception message:The 'http://sleuthsoftware.com/MasterNameLookup:SleuthNameInfo' element is not declaredI'm assuming it's because the XmlValidatingReader cannot find the schema file. Is that right? If so, where do I need to put the .xsd?
Thanks,
Mike
Edit: After reading/trying code, I believe this is more or a .NET issue, not really sure. So I asked a similar question here (http://www.vbforums.com/showthread.php?t=316396) Apologies for a cross-post.
The reason I think it's more a .NET thing is because I never set up my XmlValidatingReader correctly, which I'm trying to do now, just can't get it yet.
I have an .xsd and an .xml file, the top of the xml looks like this:<?xml version='1.0' encoding='UTF-8'?>
<SleuthNameInfo
xmlns="http://sleuthsoftware.com/MasterNameLookup"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:SchemaLocation = "http://sleuthsoftware.com/MasterNameLookup SleuthNameInfo.xsd"
xsi:noNamespaceSchemaLocation="SleuthNameInfo.xsd"
ORI="NM1234567">
When I test the validation with XmlSpy, both xml and xsd files are in the same directory and all works fine. Now I want to upload to my web site and validate with .NET. I get this exception message:The 'http://sleuthsoftware.com/MasterNameLookup:SleuthNameInfo' element is not declaredI'm assuming it's because the XmlValidatingReader cannot find the schema file. Is that right? If so, where do I need to put the .xsd?
Thanks,
Mike
Edit: After reading/trying code, I believe this is more or a .NET issue, not really sure. So I asked a similar question here (http://www.vbforums.com/showthread.php?t=316396) Apologies for a cross-post.
The reason I think it's more a .NET thing is because I never set up my XmlValidatingReader correctly, which I'm trying to do now, just can't get it yet.