i'm having a hard time translating this php code into rails.
$doc = new DOMDocument();
$doc->loadXML($in);
/* Iterating through the XML and store the data points into the $list array */
$params = $doc->getElementsByTagName( "param" );
foreach( $params as $param )
{
$names = $param->getElementsByTagName( "name" );
$name = $names->item(0)->nodeValue;
$values = $param->getElementsByTagName( "value" );
$value = $values->item(0)->nodeValue;
$list[$name] = "'".mysql_escape_string($value)."'";
}