I have a file in the below format.
<mi> <mt>ProcessorOccupancyHexagon2Usage</mt> <mt>ProcessorOccupancyHexagon2Avg</mt> <mt>ProcessorOccupancyHexagon2Max</mt> <mv> <moid>cpuId=0</moid> <r>15.5051</r> <r>15.6304</r> <r>39.1236</r> </mv> </mi> <mi> <mt>VS.numberOfDlSrbSduReceived</mt> <mt>VS.numberOfDlSrbPduTransmitted</mt> <mt>VS.numberOfSrbDeliveryIndSent</mt> <mt>VS.numberOfDlSrbPduDropNackRecvd</mt> <mt>VS.numberOfDlSrbSduDiscarded</mt> <mt>VS.numberOfSrbUlPduReceived</mt> <mt>VS.numberOfSrbUlSduTransmitted</mt> <mt>VS.numberOfUlSrbSduDropped</mt> <mv> <moid>plmnId=26290,HenBId=768012,crnti=132,srbId=1</moid> <r>53</r> <r>53</r> <r>22</r> <r>0</r> <r>0</r> <r>63</r> <r>63</r> <r>0</r> </mv> <mv> <moid>plmnId=26290,HenBId=768012,crnti=132,srbId=2</moid> <r>30</r> <r>30</r> <r>30</r> <r>0</r> <r>0</r> <r>52</r> <r>52</r> <r>0</r> </mv> </mi>
the above file need to be converted in to the below format.
cpuId=0 ProcessorOccupancyHexagon2Usage 15.5051 ProcessorOccupancyHexagon2Avg 15.6304 ProcessorOccupancyHexagon2Max 39.1236 plmnId=26290,HenBId=768012,crnti=132,srbId=1 VS.numberOfDlSrbSduReceived 53 VS.numberOfDlSrbPduTransmitted 53 VS.numberOfSrbDeliveryIndSent 22 VS.numberOfDlSrbPduDropNackRecvd 0 VS.numberOfDlSrbSduDiscarded 0 VS.numberOfSrbUlPduReceived 63 VS.numberOfSrbUlSduTransmitted 63 VS.numberOfUlSrbSduDropped 0 plmnId=26290,HenBId=768012,crnti=132,srbId=2 VS.numberOfDlSrbSduReceived 30 VS.numberOfDlSrbPduTransmitted 30 VS.numberOfSrbDeliveryIndSent 30 VS.numberOfDlSrbPduDropNackRecvd 0 VS.numberOfDlSrbSduDiscarded 0 VS.numberOfSrbUlPduReceived 52 VS.numberOfSrbUlSduTransmitted 52 VS.numberOfUlSrbSduDropped 0

In reply to Need to convert the XML into file by aryapintu

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.