Thanks dears, here is the file example and below is the result I got with your commands
<?xml version="1.0" encoding="UTF-8"?>
<identifier>1234567890</identifier>
<tag>
<ntype>multi</ntype>
<mobileSubscriberType>genericSubscriber</mobileSubscriberType>
<umtsSubscriber>
<accTypeGSM>true</accTypeGSM>
<accTypeGERAN>true</accTypeGERAN>
<accTypeUTRAN>true</accTypeUTRAN>
</umtsSubscriber>
<wllSubscriber>false</wllSubscriber>
<mscat>10</mscat>
<odboc>0</odboc>
<odbic>0</odbic>
<odbr>0</odbr>
<odboprc>0</odboprc>
<odbssm>0</odbssm>
<clip>true</clip>
<clipOverride>false</clipOverride>
<colpOverride>false</colpOverride>
<hold>true</hold>
<mpty>true</mpty>
<nwa>3</nwa>
<odbgprs>0</odbgprs>
<rr>WhiteL</rr>
<sr>2</sr>
<odbsci>0</odbsci>
<ts11>
<msisdn>12345</msisdn>
<bcieID>TELEPHON</bcieID>
</ts11>
<ts21>
<msisdn>12345</msisdn>
</ts21>
<ts22>
<msisdn>12345</msisdn>
</ts22>
<bs30genr>
<msisdn>12345</msisdn>
<bcieID>VIDEO</bcieID>
</bs30genr>
<gprs>
<msisdn>12345</msisdn>
</gprs>
<cfu>
<basicServiceGroup>TS10-telephony</basicServiceGroup>
<status>4</status>
<notifyCallingSubscriber>false</notifyCallingSubscriber>
</cfu>
<cfu>
<basicServiceGroup>BS30-dataSync</basicServiceGroup>
<status>4</status>
<notifyCallingSubscriber>false</notifyCallingSubscriber>
</cfu>
<cfb>
<basicServiceGroup>TS10-telephony</basicServiceGroup>
<isdnNumber>1234567</isdnNumber>
<status>7</status>
<notifyCallingSubscriber>false</notifyCallingSubscriber>
<notifyForwardingSubscriber>false</notifyForwardingSubscriber>
<ftnoType>internat</ftnoType>
</cfb>
</tag>
Result which was fine for some lines but not for others
#awk '/^<\/.*>$/{print $0",";next}{printf $0","}END{printf "\n"}' testtag
<?xml version="1.0" encoding="UTF-8"?>,<identifier>1234567890</identifier>,,<tag>,<ntype>multi</ntype>,<mobileSubscriberType>genericSubscriber</mobileSubscriberType>,<umtsSubscriber>,<accTypeGSM>true</accTypeGSM>,<accTypeGERAN>true</accTypeGERAN>,<accTypeUTRAN>true</accTypeUTRAN>,</umtsSubscriber>,
<wllSubscriber>false</wllSubscriber>,<mscat>10</mscat>,<odboc>0</odboc>,<odbic>0</odbic>,<odbr>0</odbr>,<odboprc>0</odboprc>,<odbssm>0</odbssm>,<clip>true</clip>,<clipOverride>false</clipOverride>,<colpOverride>false</colpOverride>,<hold>true</hold>,<mpty>true</mpty>,<nwa>3</nwa>,<odbgprs>0</odbgprs>,<rr>WhiteL</rr>,<sr>2</sr>,<odbsci>0</odbsci>,<ts11>,<msisdn>12345</msisdn>,<bcieID>TELEPHON</bcieID>,</ts11>,
<ts21>,<msisdn>12345</msisdn>,</ts21>,
<ts22>,<msisdn>12345</msisdn>,</ts22>,
<bs30genr>,<msisdn>12345</msisdn>,<bcieID>VIDEO</bcieID>,</bs30genr>,
<gprs>,<msisdn>12345</msisdn>,</gprs>,
<cfu>,<basicServiceGroup>TS10-telephony</basicServiceGroup>,<status>4</status>,<notifyCallingSubscriber>false</notifyCallingSubscriber>,</cfu>,
<cfu>,<basicServiceGroup>BS30-dataSync</basicServiceGroup>,<status>4</status>,<notifyCallingSubscriber>false</notifyCallingSubscriber>,</cfu>,
<cfb>,<basicServiceGroup>TS10-telephony</basicServiceGroup>,<isdnNumber>1234567</isdnNumber>,<status>7</status>,<notifyCallingSubscriber>false</notifyCallingSubscriber>,<notifyForwardingSubscriber>false</notifyForwardingSubscriber>,<ftnoType>internat</ftnoType>,</cfb>,