Lotus Software logo
IBM Lotus Domino Designer 8.5
  Versions 8.5 and 8.5.1






Examples: InputValidationOption property

This agent parses the origXML file, displaying parsing errors.

Sub Initialize

Dim session As New NotesSession
Dim inputStream As NotesStream
Dim outputstream As Notesstream
Dim domParser As NotesDOMParser
Dim foundError As Boolean
Dim origXML As String

On Error Goto errh

Dim voption(2) As String
voption(VALIDATE_NEVER) = "VALIDATE_NEVER"
voption(VALIDATE_ALWAYS) = "VALIDATE_ALWAYS"
voption(VALIDATE_AUTO) = "VALIDATE_AUTO"
origXML = "c:\dxl\XMLvalid.xml"
foundError = False

Set inputStream = session.CreateStream
inputStream.Open (origXML)
If inputStream.Bytes = 0 Then
foundError = True
Messagebox "XML file "+ origXML+" is empty"
Goto report
End If

Set domParser=session.CreateDOMParser(inputStream, outputStream)
domParser.LogComment = "DOM Parser Report - Input validation"
domParser.InputValidationOption = VALIDATE_NEVER

domParser.Process

report:
If Not foundError Then Messagebox "Validation option " _
+voption(domParser.InputValidationOption)+" passed"
Exit Sub
errh:
foundError = True
Messagebox domParser.Log
Resume report
End Sub
Related topics
InputValidationOption property
Log property
LogComment property




Library | Support | Terms of use |

Last updated: Monday, October 5, 2009