Initialize() |
Top Previous Next |
Object: EHL7.QSXML FileName: EHL7.dll
METHOD
Name: Initialize() Parameters: 1) pavDesiredVersion (Optional enum: ParserVersionConstant) Default = qsxAuto Returns: Boolean Description: This is a default method called internally when the object is instantiated. It will automatically try to initialize using the highest version of Microsoft XML installed on the users computer (qsxAuto). It is only necessary to call this method if you wish to initialize a specific XML version.
Example: Dim myXMLObj As New EHL7.QSXML Dim strXML As String 'Try to initialize specifically to version 4 If Not .Initialize(qsxV40) Then MsgBox "The user does not have Microsoft XML Version 4 on their computer" Set myXMLObj = Nothing Exit Sub End If strXML = "<BADXML>>><\BADXML>" With myXMLObj Call .OpenFromString(strXML) If .IsError Then MsgBox .LastError .ClearErrors strXML = "<GOODXML></GOODXML>" Call .OpenFromString(strXML) If .IsError Then MsgBox .LastError .ClearErrors Else MsgBox "Got it right the second time" End If End If End With Set myXMLObj = Nothing
|