>>oDom=CREATEOBJECT("Msxml2.DOMDocument.4.0") >>m.odom.load("abcroot.xsd") >>oCache=CREATEOBJECT("Msxml2.XMLSchemaCache.4.0") >>m.ocache.add("http://www.myserver.com/abc",m.odom.documentElement) >>oSchema = m.ocache.getSchema("http://www.myserver.com/abc") >>>>I am getting an error at this line:
oSchema=oCache.getSchema("http://www.myserver.com/abc")
when I apply it to my schema file. My schema has a namespaceURI. The error says "OLE Error code 0x80020003: Member not found".>CLEAR >CLOSE TABLES ALL > >TEXT TO cSomeSchema NOSHOW ><?xml version = "1.0" encoding="Windows-1252" standalone="yes"?> ><xsd:schema id="VFPDataSet" targetNamespace="SomeNamespace" xmlns="SomeNamespace" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" > attributeFormDefault="qualified" elementFormDefault="qualified"> > <xsd:element name="VFPDataSet" msdata:IsDataSet="true"> > <xsd:complexType> > <xsd:choice maxOccurs="unbounded"> > <xsd:element name="someTable" minOccurs="0" maxOccurs="unbounded"> > <xsd:complexType> > <xsd:sequence> > <xsd:element name="somefield"> > <xsd:simpleType> > <xsd:restriction base="xsd:string"> > <xsd:maxLength value="15"/> > </xsd:restriction> > </xsd:simpleType> > </xsd:element> > </xsd:sequence> > </xsd:complexType> > </xsd:element> > </xsd:choice> > <xsd:anyAttribute namespace="http://www.w3.org/XML/1998/namespace" processContents="lax"/> > </xsd:complexType> > </xsd:element> ></xsd:schema> >ENDTEXT > >cSchemaFileName=SYS(5)+CURDIR()+"schema.xsd" >STRTOFILE(cSomeSchema, cSchemaFileName) > >oDom=CREATEOBJECT("Msxml2.DOMDocument.4.0") >oDom.load(cSchemaFileName) >oCache=CREATEOBJECT("Msxml2.XMLSchemaCache.4.0") >oCache.add("SomeNamespace",oDom.documentElement) >oSchema=oCache.getSchema("SomeNamespace") >?oSchema.targetNamespace >oVFPDataSet=oSchema.elements(0) >?oVFPDataSet.namespaceURI,oVFPDataSet.name >oSomeTable=oVFPDataSet.type.contentModel.particles(0) >?oSomeTable.namespaceURI,oSomeTable.name >oSomefield=oSomeTable.type.contentModel.particles(0) >?oSomefield.namespaceURI,oSomefield.name, ; > oSomefield.type.baseTypes(0).name, oSomefield.type.maxLength >>
oSomeTable=oVFPDataSet.type.contentModel.particles(0)I don't see contentModel in the IntelliSense list.
"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."
- Ephesians 4:29-30 NIV
Dare to Question -- Care to Answer
Time is like water in a sponge, as long as you are willing you can always squeeze some.
--Lu Xun, Father of Modern Chinese Literature