Need help of script

I have an xml data and i need to get the following output

--
      <application>
        <id type="integer">513393</id>
        <name>test1</name>
--
      <application>
        <id type="integer">420476</id>
        <name>test2</name>
--

Need the output like
I am not good at awk to fix this issue :wall:

513393=>test1
420476=>test2
nawk -F'[<>]' '$2~"^id type="{id=$3;next} $2=="name" {print id "=>" $3}' myXML.xml
1 Like

thanks it works great!