I’m working on my 1st XML project. I’ve received an xsd and a sample xml file from our vendor. I’ve been reading Fabio Vazquez’s article
Introducing XML for VFP programmers Part II (where's Part I by the way :)). Using some code modified from that article I’m trying to use MSXML 4.0 to validate the xml file against the scheme.
Here is the code I have:
LOCAL loXMLSchema as "MSXML2.XMLSchemaCache.4.0"
loXMLSchema = CREATEOBJECT("MSXML2.XMLSchemaCache.4.0")
loXMLSchema.add("", "CAMERAPHOTO.XSD")
…
But the code returns an OLE error on the line:
loXMLSchema.add("", "CAMERAPHOTO.XSD")
The error is:
OLE IDispatch exception code 0 from msxml4.dll:
File:///c:/projects/xml/test/CAMERAPHOTO.XSD/schema[1]/complexType[position() = 1 and @name = 'ApertureDimension']/simpleContent[1]/extension[1]
Undeclared XSD type : 'Dimension'.
This seems to indicate there is a problem with the schema file itself that I should report to our vendor. Is that correct?
Thanks!
Rob