I didn't get a response to my post to this list, so I cross-posted to 
the CFTalk list.  Nick de Voil provided a reference that was useful.

Here is what I have found so far:


Thanks Nick1

From your reference, and a few others I found, I was able to cobble 
together a simple CF program that actually works!

   <cfscript>
     schemaCache = CreateObject("COM","MSXML2.XMLSchemaCache.4.0");
     schemaCache.Add("","c:\test\listschema.xml");
     doc = CreateObject("COM","MSXML2.DOMDocument.4.0");
     doc.schemas = schemaCache;
     doc.async = 0;
     doc.load("c:\tesr\publist_schema.xml");
     XMLParsingError = doc.parseError;
   </cfscript>

   <cfoutput>
   <br>ErrorCode.....|#XMLParsingError.ErrorCode#|
   <br>Reason........|#XMLParsingError.Reason#|
   </cfoutput>


I am really "shooting in the dark" though:

   VBS 5 does not support "Dim ... As" to create an object

   The Object ClassName "MSXML2.XMLSchemaCache40" in VB, needs to be 
specified as
   "MSXML2.XMLSchemaCache.4.0" in cfobject

   The Object ClassName "MSXML2.DOMDocument40" in VB, needs to be specified as
   "MSXML2.DOMDocument.4.0" in cfobject

So far, I have only been able to validate by loading the XNL document 
from disk.

I would like to do much more, but have been unable to find any info 
on the MSXML 4.0 objects, methods and properties.

Any help will be greatly appreciated!

Dick

At 4:45 AM -0500 12/15/01, Nick de Voil wrote:
>Dick
>
>Does this help?
>
>http://www.vbws.com/tutors/xsd/xsdvb.aspx
>
>The nitty-gritty part seems to be
>
>Dim schemaCache As MSXML2.XMLSchemaCache40
>Set schemaCache = New MSXML2.XMLSchemaCache40
>schemaCache.Add ��,�D:\schemas\mySchema.xsd�
>Dim doc As MSXML2.DOMDocument40
>Set doc = New MSXML2.DOMDocument40
>Set doc.schemas = schemaCache
>doc.async = False
>If Not doc.Load(�D:\docs\myDoc.xml�) Then
>         MsgBox "Error loading XML document: " & doc.parseError.reason
>End If
>
>which CFOBJECT could handle I dare say.
>
>Nick


-----------------------+
cf-xml mailing list
list: [EMAIL PROTECTED]
admin: [EMAIL PROTECTED]
home: http://torchbox.com/xml

Reply via email to