Possible Duplicate:
Grabbing the href attribute of an A element
I'm currently trying to parse a webpage for a specific element which will be in this format:
<div id="main-id">
<div id="sub-id-1" onclick="some onclick">
<span class="big-class" style="some style">
</span>
<div id="sub-id-2"> </div>
</div>
The main part I'm trying to pull from this is the entire <span class="big-class" style="some style">
tag, as I need to pull the style from the element and store it to a string. To do this, I tried using the following code:
$dom = new DOMDocument();
$dom->validateOnParse = true;
$dom->loadHTML($html);
$belement = $dom->getElementById("main-id");
echo $belement->nodeValue;
However, this is only returning the character Â
, which is what the character code  
is for.
I'm not really sure what to search for in order to accomplish this, and I'm not even sure if pull entire HTML lines(?) with DOM. Is there any way I could use DOM to return this span element?