Converting perl output to XML(tags)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CodeGirl1991
    New Member
    • May 2020
    • 1

    Converting perl output to XML(tags)

    0


    I have used TAP3Edit for decoding my TAPFiles, I don't know what is the exact file format of my input(Shared below)? It is not JSON and I wonder if anyone knows the format of this output? The other question is about converting this input to XML file(I shared relative output here) automatically and with perl or any other programming languages?( I heared Perl works perfect for text processing)

    PS: This data is not real and I provide it just for testing.

    Input

    $VAR1 = {

    'Detail' => [ {
    'TimeStamp' => {
    'LocalTime' => '20200231',
    'utcTime' => 2
    },
    'A-Value' => 1,
    'B-Value' => '2',
    'C-Value' => 3,
    'D-Value' => 4
    }
    ]
    }
    Output

    <Detail> <TimeStamp> <LocalTime> 20200231 </LocalTime> <utcTime> 2 </utcTime> <A-Value> 1 </A-Value> <B-Value> 2 </B-Value> <C-Value> 1 </C-Value> <D-Value> 2 </D-Value> </Detail>
  • Luuk
    Recognized Expert Top Contributor
    • Mar 2012
    • 1043

    #2
    If the files are using this: https://tap3edit.github.io/TAP3-Tap3edit.html, then i cannot help you 😎

    Because that would be too complex, if you do not already have that knowledge... (and i am also not having that knowledge!)

    Comment

    Working...