Replies: 1   Views: 838
Scope getdocxpathqueryinfo to table cells
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by bkidd  · 15-07-2020 - 15:27

When using this method, how can I limit the results to only elements that exist inside of a table cell?  For example, if I only want images, I can use:

$referenceNode = ['customQuery' => '//w:drawing//wp:docPr'];

What would I need to do to get only images that exist within table cells?

Posted by admin  · 15-07-2020 - 18:02


Cells use w:tc tags, so you can query //w:tc tags that contain other tag or content using a custom XPath query.