Create output XML siblings, only if input values are present in flat file record

Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Create output XML siblings, only if input values are present in flat file record

Viewing 0 reply threads
  • Author
    Posts
    • #16656

      I have a simple flat file schema (just a list of comma delimited records, one on each line – all of the same type).

      What I’m doing is populating a couple of values in the destination schema based on a couple of values in the source (no problem).  What I need to do is populate a couple more values in the destination (in a sibling of the same type as described above), only if there are values present in the source. Best served by example:

      Example Source Record
      a,b,c,d,e,f

      Expected output
      <node1>
      <node2 a1=”a” a2=”b”/>
      <node2 a1=”c” a2=”d”/>
      <node2 a1=”e” a2=”f”/>
      </node1>

      Example Source Record
      a,b,,,,

      Expected output
      <node1>
      <node2 a1=”a” a2=”b”/>
      </node1>

      That is, situations where values in the source record or omitted, no sibling node is created in the output XML. Obviously, the output schema is such that <node2> minoccurrences=1, and maxoccurrences=unbounded. (I cannot change my output schema, that was given to me).

      Any help would be greatly appreciated.

      Thanks!

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