I have a bizarre problem when I try to validate XML documents and their
schemas once they have been opened and transfered to a Visual Web Developer
2005 Express project. I receive validation errors for XML/XSDs that worked
fine when first created in another environment (XMLSpy trial).
I have a source XML document and an XSD file created wtih XMLSpy and stored
in a separate folder. When I run a very simple VBScript to validate the XML
with the XSD (in the process of a bulkload to SQL Server with
SQLXMLBulkload. 4.0), there are no validation errors, and the load to the DB
works perfectly.
When I try to use the exact same VBScript to bulkload copies of the same
files from before, which were duplicated and added to a Visual Web Developer
project, I get validation errors like
"Schema: unable to load schema 'XXXX'. An error occurred (Text is not
allowed in the context of
element'{http://www.w3.org/2001/XMLSchema}seque nce' according to DTD/Schema"
And then I get a validation error for a simple type like:
'DANNER' violates length constraint of ' 50'
The element 'LastName' with value 'DANNER' failed to parse.
with the source <LastName>Danne r</LastNamefor the simple type below
<xs:simpleTyp e name="VARCHAR_5 0">
<xs:restricti on base="xs:string ">
<xs:length value="50"/>
</xs:restriction>
</xs:simpleType>
So, it seems like the XSD file has been changed somehow and cannot be parsed
or is stricter???? Are there changes to the encoding or whitespace when an
XSD file is opened/transferred to Visual Web Developer 2005 Express?
Thanks for any help.