I am attempting to remove from the next string EXCEPT the item tag:

<p>If a post is marked video, and there is text BEFORE the video, the video player does not appear! We only see the actual text for the url…</p>
<p>&nbsp;</p>
<p><object width="584" height="463"><param value="http://www.youtube.com/v/Clp9AeBdgL0?version=3" name="movie"><param value="true" name="allowFullScreen"><param value="always" name="allowscriptaccess"><embed width="584" height="463" allowfullscreen="true" allowscriptaccess="always" type="application/x-shockwave-flash" src="http://www.youtube.com/v/Clp9AeBdgL0?version=3"></object></p>
<p>Of course, you might even have a paragraph AFTER the video. Could be lots and lots of meaningless text &ndash; we should definitely limit this. Lorem ipsum</p>

As you can tell above, the 3rd 'p' tag consists of an 'object' tag. I wish to eliminate everything except the 'object' tag and it is contents. Quite simply, Let me traverse the DOM and take away everything except:

<object width="584" height="463"><param value="http://www.youtube.com/v/Clp9AeBdgL0?version=3" name="movie"><param value="true" name="allowFullScreen"><param value="always" name="allowscriptaccess"><embed width="584" height="463" allowfullscreen="true" allowscriptaccess="always" type="application/x-shockwave-flash" src="http://www.youtube.com/v/Clp9AeBdgL0?version=3"></object>

I could write a function that removed any particular tag (p, img, div, etc) and it is contents from the string, by crossing the DOM, however i couldn't learn how to preserve the items in a young child tag as with this situation. Can anybody help?

Rather than crossing the DOM with XML-parsed object (that is what it really seems like you are doing, sorry if I am incorrect), I'd suggest simply using a normal-expressions type explore your string.

PHP supports PCREs

EDIT: It appears like '/<object .*<\/object>/' works. You can look at PHP regex here -- I made use of the preg_match() function. Also, for those who have multiple <object>s per page, you will need to make certain you are not using "greedy" matching. Lastly, this won't use nested objects, although I do not anticipate to ask them to.

Therefore the whole snippet may be:

$pattern = '/<object .*<\/object>/';
$subject = /* this is your string containing the html' */
$matches = array();

if(preg_match($pattern, $subject, $matches))
{
    echo $matches[0];
}
else
{
    echo "No match found."
}