Here's a simplistic example (no error-checking, sql-injection prevention, etc.):
<pre><?php
// define $string, then...
$xml = simplexml_load_string($string);
foreach($xml->row as $row)
{
$query = "INSERT INTO tablename VALUES('" . $row['id'] . "',";
foreach($row->cell as $value)
{
$query .= "'".$value."',";
}
$query = rtrim($query, ',');
echo $query . "\n";
}
?></pre>