将vbscript转换为快速集成流语言

Convert vbscript into rapid integration flowlanguage

我正在使用 Pervasive 9.2 并想以某种方式将 vbscript 转换为 pervasives RIFL 语言。我想在执行 f(x) 组件到 运行 代码的过程中执行代码。至于 xml 数据的路径,我将使用一个宏来定义源数据的位置,并使用另一个宏来保存文件。

下面是 vbscript 代码:

Set xml = CreateObject("Microsoft.XMLDOM")

xml.async = False
count_var = 1

If xml.Load("c:\folder1\test.xml") Then             
    For Each accounts In xml.SelectNodes("//Accounts")               
        For Each account In Accounts.SelectNodes("./Account")      
            If count_var > 1 Then           
                Set accountEnum = xml.createNode(1, "Account" & count_var, "")                                      
                For Each child In Account.childNodes                                                
                    accountEnum.appendChild(child.cloneNode(TRUE))                    
                Next
                Accounts.replaceChild accountEnum, Account          

                xml.save("c:\folder1\test.xml")

            else                     
               Set accountEnum = xml.createNode(1, "Account" & count_var, "")

               For Each child In Account.childNodes
                  accountEnum.appendChild(child.cloneNode(TRUE))
               Next       
               Accounts.replaceChild accountEnum, Account           

               xml.save("c:\folder1\test.xml")        

              End If
              count_var = count_var + 1

        Next           
        count_var = 1   
    Next
End If

Set node = Nothing
 Set xml = Nothing

ParseXMLFile(filepath)

文档在这里

http://docs.pervasive.com/products/integration/di/rifl/wwhelp/wwhimpl/common/html/wwhelp.htm#href=ParseXMLFile_Function.html&single=true

这将 return 一个 DOMDocument Object Type

文档在这里

http://docs.pervasive.com/products/integration/di/rifl/wwhelp/wwhimpl/common/html/wwhelp.htm#href=DOMDocument_Object_Type.html&single=true

希望这对您有所帮助