Hello,
Please note the following option available when using DOCXPath methods:
parent string Main document body as default, allows to set any parent or a specific one. w:body (default), '/' (any parent) or any other specific parent (/w:tbl/, /w:tc/, /w:r/...).
As default, the query is done only to direct children of the main tag (w:body). If you want to get all bookmarks, this is with any parent, you need to set parent to '/'. For example:
$docx->getDocxPathQueryInfo([
'type' => 'bookmark',
'parent' => '/',
]);
Also note that in a DOCX, a bookmark is a single tag without other contents. To extract fields using getDocxPathQueryInfo you may need to do a custom DOCXPath query. If you send a sample DOCX to contact[@]phpdocx.com we can generate a sample script to illustrate it.
Regards.