Record count command giving LoadXML error before insert stmt

if ($rs->RecordCount() > 0 )
{
$stmts;
 }

I am getting error
Error Type : LoadXML
Description : InCorrect XML

please solve my problem

thanks in advance

I wrote wrongly in the action section like the following way so loadxml error occured. I solved the problem using removing the un necessary spaces


echo "<action type='action' sid='".$rowId."' tid='".$newId."'>The nm  $m_i is already being held by this facility ...... Insert failed...~".$rowId."</action>";