Transform string to XML using Map?

Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Transform string to XML using Map?

Viewing 1 reply thread
  • Author
    Posts
    • #24492

       

      Hi all,

      I have a database table which I am polling (TypedPolling) using the WCF-Custom adapter using a sqlbinding.

      The Polling SQL statement returns various fields but the most important field in the table is the ‘Data’ field which essentially contains xml formatted information.

      This is returned as a string type, which is fine, but then needs to be mapped to a schema which matches the shape of the xml data part i.e.

      If the adapter returns:

       

      <ns0:TypedPollingResultSet0 xmlns:ns0=”http://schemas.microsoft.com/Sql/2008/05/TypedPolling/getxmldata”&gt;

        <ns0:JobID>10</ns0:JobID>

        <ns0:JobName>ExampleJob</ns0:JobName>

        <ns0:DataType>Table</ns0:DataType>

        <ns0:DataLocation>TheJobTable</ns0:DataLocation>

        <ns0:Direction>true</ns0:Direction>

        <ns0:Status>Pending</ns0:Status>

        <ns0:Data><Transaction><TransactionType>TypeA</TransactionType><Amount>10</Amount></ns0:Transaction></ns0:Data>

      </ns0:TypedPollingResultSet0>

       

       

      … I need to map the Data element to my ‘Transaction’ schema i.e

       

      <Data> —————————————–> <Schema>

                                                                            |…. MyTransaction             

                                                                                  |… TransactionType

                                                                                  |… Amount

       

       

      So is there a simple way to do this through a Map or do I need to write custom xslt or some custom code to manage this?

      Any ideas, anecdotes, examples would be appreciated,

      Many Thanks,

       

      Dave

       

    • #24496

      Answer looks okay to me..  Have you tried the given solution here: http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/9899497a-ebc8-4303-93e5-b7542a8ac378

       

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.