Share via


Source: XSLT.frm

 

The following code is the Visual Basic file.

Visual Basic Source File (XSLT.frm)

Private Function CreateDOM()
    Dim dom
    Set dom = New DOMDocument60
    dom.async = False
    dom.validateOnParse = False
    dom.resolveExternals = False
    Set CreateDOM = dom
End Function

Private Sub Form_Load()
    Dim doc, xsl, out, str
    
    Set doc = CreateDOM
    doc.Load App.Path + "\test.xml"
    
    Set xsl = CreateDOM
    xsl.Load App.Path + "\test.xsl"
    
    str = doc.transformNode(xsl)
    MsgBox "doc.transformNode: " + vbNewLine + str
        
    Set out = CreateDOM
    doc.transformNodeToObject xsl, out
    MsgBox "doc.transformNodeToObject:" + vbNewLine + out.xml
End Sub

To add XSLT.frm to the project

  1. Copy the code listing above. Paste it into the Visual Basic code editor as the form_load subroutine, replacing any code fragments that are already there.

Next, add the resource files to the project.