-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: Raja Thangavel
Message 4 in Discussion
Hi,
I am trying to validate an XML file using the XmlValidatingReader.
The code for which goes like this:
// Read the XML file.
XmlTextReader xmlReader = new XmlTextReader( _PathToXMLDoc);
XmlValidatingReader valReader = new XmlValidatingReader(xmlReader);
valReader.ValidationType = ValidationType.Schema;
valReader.ValidationEventHandler += new
ValidationEventHandler(this.ValidationCallBack);
while(valReader.Read())
{
}
I have the XML document which refers to a xsd file located on a directory
on the local workstation.
If my XML document has the attribute:
xsi:schemaLocation="20040518 C:\Inetpub\wwwroot\20040518.xsd">
then the validation suceeds.
But if I were to change the attribute to:
xsi:schemaLocation="20040518 http://localhost/20040518.xsd";>
I get the error:
"Cannot load schema for the namespace '20040518' - Specified argument was
out of the range of valid values.
Parameter name: The specified value must be greater than 0."
I am able to view the XSD file in IE using the URL
http://localhost/20040518.xsd, hence I know that the XSD file is present and
the IIS is configured correctly.
This scenerio is not working Windows 2003 Server where as in XP everything work
fine.
Any ideas as what's causing this error?
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]