protected function loadXmlDocument($filename, TSqlMapXmlConfiguration $config)
{
if (strpos($filename, '${') !== false) {
$filename = $config->replaceProperties($filename);
}
if (!is_file($filename)) {
throw new TSqlMapConfigurationException('sqlmap_unable_to_find_config', $filename);
}
return simplexml_load_string($config->replaceProperties(file_get_contents($filename)));
}