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
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to