LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  XML Node

    Employee
    Posted 06-19-2012 13:17

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: xathras

    Hi,

    I am looking at the XML Node, but wanted to ask some more question. I have some simple output, e.g. below:

    type:string, trantype:string,bin:string,merch:string,profile:
    EC, AC,000001,012012,1
    EC, AC,000001,012012,2
    EC, AC,000001,012012,3
    EC, AC,000001,012012,4

    and I want to convert it into an XML output like the below.

    <?xml version="1.0" encoding="UTF-8"?>
    <transRequest RequestCount="4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <batchFileID>
    <userID>bob</userID>
    <fileDateTime>20110610191317</fileDateTime>
    <fileID>batch_20110610191317</fileID>
    </batchFileID>
    <newOrder BatchRequestNo="1">
    <type>EC</type>
    <trantype>AC</trantype>
    <bin>000001</bin>
    <merch>012012</merch>
    <profile>1</profile>
    </newOrder>
    <newOrder BatchRequestNo="2">
    <type>EC</type>
    <trantype>AC</trantype>
    <bin>000001</bin>
    <merch>012012</merch>
    <profile>2</profile>
    </newOrder>
    <newOrder BatchRequestNo="3">
    <type>EC</type>
    <trantype>AC</trantype>
    <bin>000001</bin>
    <merch>012012</merch>
    <profile>3</profile>
    </newOrder>
    <newOrder BatchRequestNo="4">
    <type>EC</type>
    <trantype>AC</trantype>
    <bin>000001</bin>
    <merch>012012</merch>
    <profile>4</profile>
    </newOrder>
    </transRequest>

    Is it possible to do this with current node, or do I have to massage the data? See example

    Where RequestCount would = number of transactions and BatchRequestNo = request number (e.g. sequence).

    Ideas would be greatly appreciated.

    Regards
    Wayne


  • 2.  RE: XML Node

    Employee
    Posted 07-03-2012 11:06

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: rboccuzzi

    Unfortunately, with our current XML output node, you can't quite get the output exact. I have attached a graph that does create the output you desire, but required me to use another couple of nodes to massage the XML after writing it. I also gave you a date string in the header; I left the exact formatting and also proper replacing of the file id as an exercise left to the reader, but I think you should be able to see how I did this, and how to complete it if desired, using this pattern.

    Cheers
    Rich
    Attachments:
    xml example.brg


  • 3.  RE: XML Node

    Employee
    Posted 07-05-2012 14:24

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: xathras

    Hi Rich,

    Thanks for the input. I had assumed so, and come up with something to get round this, However it was a lot more long winded and inefficient like yours

    Thanks again
    Wayne