Click here to Skip to main content
11,927,324 members (51,631 online)
Rate this:
Please Sign up or sign in to vote.
See more: VBScript XML
object doesnt support this property or method.
ActiveDocument.AssignSchema ANY THOUGHT?

''Set xapp=CreateObject("XMLSpy.Application")
' Or uncomment the following line to try GetObject
'Set xapp=GetObject("", "XMLSpy.Application")
''xapp.Visible = True
''MsgBox "XMLSpy should now be visible"
' the event handler function
Function DocEvent_OnBeforeCloseDocument(objDocument)
       Call WScript.Echo("received event - before closing document")
End Function
' create or connect to XMLSPY
Set objWshShell = WScript.CreateObject("WScript.Shell")
Set objFSO = WScript.CreateObject("Scripting.FileSystemObject")
Set objSpy = WScript.GetObject("", "XMLSpy.Application")
' If only Authentic is installed (and XMLSpy is not installed) use:
' Set objSpy = WScript.GetObject("", "AuthenticDesktop.Application")
' create document object and connect to its events
objSpy.Visible = True
Set objDoc = objSpy.Documents.OpenFile ("C:\\OrgChart.xml", False)
Call WScript.ConnectObject(objDoc, "DocEvent_")
'call the XSD schema file
Set appXSD = WScript.CreateObject("XMLSpy.Application")
Set ActiveDocument = objSpy
ActiveDocument.AssignSchema "C:\\fpml-main-5-1.xsd",true
Set objDlg= "c:\\test.html"
objSpy.Documents.GenerateSchemaDocumentation objDlg
'objSpy.ActiveDocument.AssignSchema  "C:\\fpml-main-5-1.xsd",False
' keep running while waiting on the event
' in the meantime close the document in XMLSPY manually
Call WScript.Echo ("sleeping for 10 seconds ...")
Call WScript.Sleep (10000)
Set objDoc = Nothing
Call WScript.Echo ("stopped listening for event")
Call objSpy.Quit

PLEASE REPLACE ' with ' (single quote)
Posted 4-May-11 10:23am
S Mewara 5-May-11 2:52am
Not clear.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Advertise | Privacy | Mobile
Web02 | 2.8.151126.1 | Last Updated 4 May 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100