good day dear php-folks

well in general i do it like so:

if i have a certain document from which I want to extract specific div with it's untouched content. I do:
$dom = new DOMDocument();
$dom->loadHTML($string);//that's HTML of my document, string
and xpath query:
$xpath = new DOMXPath($dom);
$xpath_resultset =  $xpath->query("//div[@class='text']");
/*I'm after div class="text"*/
now I do item(0) method on what I get with $xpath_resultset

$my_content = $xpath_resultset->item(0);
but with this i get the object - and not the string $my_content which I can echo or settype() to string,

When i want to get all from div class='text' here i have to do the following:

i just pass the node to the DOMDocument::saveHTML method:

$htmlString = $dom->saveHTML($xpath_resultset->item(0));
This will give me a string representation of that particular DOMNode and all its children.

But can i output the referential data of a Xpath with that!?