XSD Sample:
<xsd:element name="est_ph1" type="phoneType"/>
....
<xsd:simpleType name="phoneType">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[0-9]{3}-[0-9]{7}"/>
</xsd:restriction>
</xsd:simpleType>
VB Code Sample:
Set doc.schemas = schemaCache
doc.async = False
doc.validateOnParse = True
strXMLin = "<est_ph1>asdkfjhasdjh</ext_ph1>"
If Not doc.loadXML(strXMLIn) Then do something
no parse error is raised.
Any help would be greatly appreciated.
Thanks
set xmldoc = createobject("Msxml2.FreeThreadedDOMDocument.4.0")
set SchemaCache = createobject("Msxml2.XMLSchemaCache.4.0")
xmldoc.async = false
SchemaCache.add "", "pattern.xsd"
xmldoc.schemas = SchemaCache
if not xmldoc.load("pattern.xml") then msgbox "err"
--
Han Pohwan, Microsoft MVP, Seoul, Korea
Mail with any alphabets in the title will be removed. Use only numbers.
"James Hardy" <james...@adp.com> wrote in message
news:864801c285d8$d2995710$36ef2ecf@tkmsftngxa12...