DougieDa59
03-10-2010, 06:45 PM
Hey folks,
I'm pretty new to XML so bare with me..
I'm trying to validate an XML file using a XSD file in the same directory. The reference I have in the xml file is:
<?xml version="1.0" encoding="utf-8"?>
<newsandscores xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="C:\news.xsd">
And at the top of the XSD file:
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema targetNamespace="http://tempuri.org/XMLSchema.xsd"
elementFormDefault="qualified"
xmlns="http://tempuri.org/XMLSchema.xsd"
xmlns:mstns="http://tempuri.org/XMLSchema.xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
In the XML file, I have purposely entered a string into an attribute which is defined as an integer in the XSD in the hopes that either Visual Studio or Firefox would show it up as an error but neither do.
Any ideas?
Thanks in advance...
I'm pretty new to XML so bare with me..
I'm trying to validate an XML file using a XSD file in the same directory. The reference I have in the xml file is:
<?xml version="1.0" encoding="utf-8"?>
<newsandscores xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="C:\news.xsd">
And at the top of the XSD file:
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema targetNamespace="http://tempuri.org/XMLSchema.xsd"
elementFormDefault="qualified"
xmlns="http://tempuri.org/XMLSchema.xsd"
xmlns:mstns="http://tempuri.org/XMLSchema.xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
In the XML file, I have purposely entered a string into an attribute which is defined as an integer in the XSD in the hopes that either Visual Studio or Firefox would show it up as an error but neither do.
Any ideas?
Thanks in advance...