Hello,
The code you are using to get a reference node by an attribute isn't correct. This sample is included in the package:
$referenceNode = array(
'type' => 'paragraph',
'occurrence' => 1,
'attributes' => array('w:outlineLvl' => array('w:val' => 2)),
);
This reference node returns the first paragraph with a tag w:outlineLvl that include the attribute w:val=2. But it returns the whole paragraph, so if you use a similar code to get a table you get the whole table contents, not only the first cell.
If you get the whole table you can analyze its contents (using PHP DOM methods) using getDocxPathQuery. Using getWordContents you'd need to use a custom query, please check the included samples and the documentation about how to use custom queries.
Regards.