/**
* Search a DOM for a selector and return the contents.
*
* @param simple_html_dom $dom The DOM to search.
* @param string $selector The CSS style selector for the content to find.
* @param string $default The default content to return if the node isn't found.
* @return string Returns the content of the found node or {@link $default} otherwise.
*/
function domGetContent($dom, $selector, $default = '')
{
$Element = $dom->getElementsByTagName($selector);
return isset($Element->content) ? $Element->content : $default;
}