xml -> SQL Server

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf xml -> SQL Server

  • Creator
    Topic
  • #50030
    Steve Pringle
    Participant

    I’ve got an xml feed coming into the Interface Engine, via a socket.  I have to map the xml data to a SQL Server.  I’ll use a tcl proc to send the sql statments (via odbc).

    Is there any way I can use some functionality in the Interface Engine to map the xml data to local tcl variables, or?  I hope I’m missing something, but it looks like I have to write my own xml parser in the tcl proc.

    I’ve got the xsd compiled in the xml package manager, but I don’t see how I can use that functionality for what I’m tyring to do.  It looks like I can only use the xml package manager in conjunction with the translation configurator.

    Perhaps I use the translation configurator and from it call a tcl proc that writes to the SQL Server?

    Any suggestions greatly appreciated!

    thanks,

    Steve

Viewing 2 reply threads
  • Author
    Replies
    • #64604
      garry r fisher
      Participant

      Hi Steve,

      It depends upon how much data you need to extract from the XML. There are two ways of doing it – Using regexp or one of the XML parsers available for Tcl.

      I’ve used regexp a number of times now to extract data from XML for use in other parts of my interface without resorting to xsd files.

      Regards

      Garry

    • #64605
      Robert Kersemakers
      Participant

      Hi Steve,

      I have no experience with sending data to an SQL server, but I would translate the incoming XML to a VRL that contains all the fields you want to send to the SQL server. In the outbound thread (upoc) you can split the VRL to these fields and send them on their way.

      This way you don’t need to parse through the XML yourself.

      Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

    • #64606
      Steve Pringle
      Participant

      Thanks Gary & Robert,

      I think I’ll just use regexp as it’s simple xml, it will be easy to parse.

      –Steve

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

Forum Statistics

Registered Users
5,126
Forums
28
Topics
9,296
Replies
34,439
Topic Tags
287
Empty Topic Tags
10