Forum


Replies: 12   Views: 403
Column removal
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 admin  · 04-06-2024 - 08:32

Hello,

The customQuery option available in DOCXPath and DOCXCustomizer methods uses XPath (XML Path Language) to query contents. XPath is an XML standard language.

To understand how XPath works, we recommend you read the documentation available on https://www.w3schools.com/xml/xpath_intro.asp.

The customQuery sample from our previous reply:

'customQuery' => '//w:tbl[1]/w:tr/w:tc[2]',

selects the second cells (w:tc tag) of all rows (w:tr tag) in the first table (w:tbl tag) using XPath.

Regards.