XML parsing using nawk help needed

i need one help, below is one more xml file with diff pattern i tried it but dint get it , iam sure its a peice of cake for you guys.

<xn:MeContext id="LSVLKY001">
 <xn:ManagedElement id="1">                         
<un:RncFunction id="1">                             
<un:UtranCell id="KYLSU17A">                                 
<un:attributes>                                     
<un:localCellId>10071</un:localCellId> 
 <un:uarfcnUl>862</un:uarfcnUl>                                     
<un:uarfcnDl>1087</un:uarfcnDl>
 <unprimaryScramblingCode>361</unprimaryScramblingCode>
 <unprimaryCpichPower>315</unprimaryCpichPower> 
<un:maximumTransmissionPower>416</un:maximumTransmissionPower> 
 <unprimarySchPower>-18</unprimarySchPower> 
<un:cId>10071</un:cId>                                     
<un:secondarySchPower>-35</un:secondarySchPower>
 <un:bchPower>-31</un:bchPower> 
  <un:lac>15913</un:lac>                                     
<un:rac>13</un:rac> 
<un:sac>10071</un:sac>                 
</un:attributes>                                 
<xn:VsDataContainer id="KYLSU17A">                                     
<xn:attributes> 
<es:cellReserved>1</es:cellReserved> 
<es:administrativeState>1</es:administrativeState>
 </xn:attributes>
 </xn:VsDataContainer>
 </un:UtranCell>             
</un:RncFunction>
 </xn:ManagedElement>
 </xn:MeContext>

The xml file has the following lines in the file
There are n number of Mecontext id loops
there are y number of utrancell id loops in each Mecontext loop.
I deleted some unwanted data. i want the output to be in the following format

RNC   UtranCell   cId   uarfcnUl   uarfcnDl   primaryScramblingCode   primaryCpichPower   maximumTransmissionPower   primarySchPower   secondarySchPower   bchPower   lac   rac   sac   cellReserved   administrativeState                              
LSVLKY53RNC01   KYLSUTOY6552C   65523   862   1087   3   337   446   -18   -35   -31   15913   13   65523   1   1        
LSVLKY53RNC01   KYLSUTOY6552B   65524   862   1087   3   337   446   -18   -35   -31   15913   13   65523   1   1        
LSVLKY53RNC01 TNLSUTOY2018T 20183   862   1087   3   337   446   -18   -35   -31   15913   13   65523   1   1        
SNJNLIDCR0R03   PRSJUTOY0051Y   51   812   1037   246   337   446   -18   -35   -31   51799   255   51   1   1 
SNJNLIDCR0R03   PRSJUTOY0051X   51   812   1037   246   337   446   -18   -35   -31   51799   255   51   1   1

just an idea...of you really need to be rough..

BEGIN { print "RNC   UtranCell   cId   uarfcnUl   uarfcnDl   primaryScramblingCode   primaryCpichPower   maximumTransmissionPower   primarySchPower   secondarySchPower   bchPower   lac   rac   sac   cellReserved   administrativeState";print; )

/MeContext/ ' { a=gsub(/[^[:alnum:]]/, " ", $0); RNC=a[4]; }
/UtranCell/ {  a=gsub(/[^[:alnum:]]/, " ", $0); UTRANCELL=a[4]; }
/uarfcnUl/  { a=gsub(/[^[:alnum:]]/, " ", $0);  UARFCNUL=a[3]; }
/uarfcnDl/ { a=gsub(/[^[:alnum:]]/, " ", $0);  UARFCNDL=a[3]; }
/unprimaryScramblingCode/ { a=gsub(/[^[:alnum:]]/, " ", $0);  PRIMARYSCRAMBLINGCODE=a[2]; }
/unprimaryCpichPower/ { a=gsub(/[^[:alnum:]]/, " ", $0); PRIMARYCIPHERPOWER=a[2];}
/maximumTransmissionPower/ {a=gsub(/[^[:alnum:]]/, " ", $0); MAXTRXNPOWER=a[3]; }
/unprimarySchPower/ { a=gsub(/[^[:alnum:]]/, " ", $0);  PRIMARYSCHPOWER=a[2] ;}
/secondarySchPower/ { a=gsub(/[^[:alnum:]]/, " ", $0); SCNDRYSCHPOWER=a[3]; }
/bchPower/ { a=gsub(/[^[:alnum:]]/, " ", $0); BCHPOWER=a[3]; 
printf("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s", RNC, UTRANCELL, UARFCNUL,UARFCNDL, PRIMARYSCRAMBLINGCODE, PRIMARYCIPHERPOWER, MAXTRXNPOWER, PRIMARYSCHPOWER, SCNDRYSCHPOWER, BCHPOWER ); }' input.xml 

Hi busyboy,
Can you please explain how to use the script that you mentioned.thanks in advance.