Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VBScript XML
ERRROR:
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"
''xapp.Quit
'====================
' 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
Comments
S Mewara at 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)

  Print Answers RSS
0 OriginalGriff 390
1 Sergey Alexandrovich Kryukov 329
2 Afzaal Ahmad Zeeshan 244
3 BillWoodruff 210
4 Maciej Los 192
0 OriginalGriff 5,560
1 DamithSL 4,476
2 Maciej Los 3,942
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,175


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 4 May 2011
Copyright © CodeProject, 1999-2014
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