Hi anyone with more LotusScript/MSXML experience
There is an article at MSDN called “Validate Documents Using SAX”. Being a novice, I am struggling to implement the example using MSXML with LotusScript in Domino. Assistance, most welcome. Thanks, in advance.
Start of article at MSDN:
The VB code at MSDN:
Option Explicit
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub cmdValidate_Click()
'Clear the results window.
txtResults = “”
'Create a SAX reader.
Dim oReader As New Msxml2.SAXXMLReader40
'Create an XML schema cache.
Dim oSC As New Msxml2.XMLSchemaCache40
'Create a class module for implementing content handler,
'the error handler, and the locator interfaces.
Dim oValidator As New MyValidator
'Add the schema file to the schema cache.
oSC.Add “”, txtSchemaFile
'Configure the SAX reader.
oReader.putFeature “schema-validation”, True
oReader.putProperty “schemas”, oSC
oReader.putProperty “schema-declaration-handler”, oValidator
Set oReader.contentHandler = oValidator
Set oReader.errorHandler = oValidator
'Parse and validate the file.
On Error Resume Next
oReader.parseURL txtInputFile
On Error GoTo 0
End Sub
Private Sub Form_Load()
txtInputFile.Text = App.Path + txtInputFile.Text
txtSchemaFile.Text = App.Path + txtSchemaFile.Text
End Sub
Bill Whittakers
bw.ost@bigpond.net.au