XML API - pdx:searchAndRemove

pdx:searchAndRemove

Removes the paragraphs containing a given string of text.

Note

You are reading the XML API documentation. For the PHP API method please go to searchAndRemove.

Description

Element definition

This element allows to remove paragraphs that contain the search string.

Attributes and sub-elements

src

The path to the source Word document.

target

The path to the Word document resulting after the text highlighting.

searchTerm

The string of text that you want to highlight.

options

The possible keys and values are:

Key Description
document If true highlights the search string in the body of the document. The default value is true.
endnotes If true highlights the search string in the document endnotes. The default value is false.
comments If true highlights the search string in the document comments. The default value is false.
headersAndFooters If true highlights the search string in headers and footers. The default value is true.
footnotes If true highlights the search string in the document footnotes. The default value is false.
Code samples

Example #1

config.xml

content.xml

settings.xml

PHP code

The resulting Word document looks like: