xml translate

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf xml translate

  • Creator
    Topic
  • #52542
    Henry Tabingo
    Participant

      I am doing an HR interface where Cloverleaf receives an FRL file with several messages in it. The messages are translated into XML. I can create one xml file per message fine. My challenge is in creating one xml file having one root element with all the messages in it.

      Let me know if someone has done a similar thing and how this was accomplished in Cloverleaf.

      Thanks,

      Henry Tabingo

      Senior Programmer/Analyst

      Adventist Health

    Viewing 2 reply threads
    • Author
      Replies
      • #74634
        Jim Kosloskey
        Participant

          Henry,

          Depending on how your Fixed Length Record file is constructed, you may be able to define it as an HRL so that you get all of the records in at once.

          However, I will caution you that this (and the resultant XML message from which it is derived) will likely be quite large (XML can be extremely inefficient).

          Another option is to have a Tcl proc on the IB Data UPoC that collects each of the records read into one message which can be defined as an HRL (will probably need to add a record separator record so that you can do some iteration in the Xlate). Again same caution as to size. You will also need some way of recognizing the last record has been read.

          Another option is use all Tcl (gathering all of the inbound together AND creating the XML out) – probably a UPoC protocol. That is not something I personally would like to do or maintain. Again be aware of the potential size issue.

          There may be other options as well – but the size issue will likely remain.

          Good luck.

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #74635
          Henry Tabingo
          Participant

            Jim,

            Thanks for the solutions you recommended. I’ll surely give one of these a try. I’ll let you know how it goes.

            Henry

          • #74636
            Henry Tabingo
            Participant

              Jim,

              I tried the first of your 3 options and it worked perfectly. The volume of the messages for this interface is not so many that the xml it creates is not extremely large. I hope that the xml size will not be an issue. Otherwise, we can always resort to one xml per message.

              Again, thank you very much for your help.

              Henry

          Viewing 2 reply threads
          • The forum ‘Cloverleaf’ is closed to new topics and replies.