XML API - pdx:replaceVariableByWordML
- addBackgroundImage
- addFooter
- addHeader
- addLineNumbering
- addMacroFromDoc
- addPageBorders
- addProperties
- addSection
- createCharacterStyle
- createListStyle
- createParagraphStyle
- docxSettings
- importHeadersAndFooters
- importListStyle
- importStyles
- modifyPageLayout
- parseStyles
- removeFooters
- removeHeaders
- setBackgroundColor
- setDefaultFont
- setDocumentDefaultStyles
- setEncodeUTF8
- setLanguage
- setMarkAsFinal
- addBookmark
- addBreak
- addChart
- addComment
- addCrossReference
- addDateAndHour
- addEndnote
- addExternalFile
- addFootnote
- addFormElement
- addHeading
- addImage
- addLink
- addList
- addMathEquation
- addMergeField
- addOnlineVideo
- addPageNumber
- addShape
- addSimpleField
- addStructuredDocumentTag
- addTable
- addTableContents
- addTableFigures
- addText
- addTextBox
- addWordML
- embedHTML
- clearBlocks
- deleteBlock
- modifyInputFields
- processTemplate
- rawSearchAndReplace
- removeTemplateVariable
- replaceListVariable
- replacePlaceholderImage
- replaceTableVariable
- replaceVariableByExternalFile
- replaceVariableByHtml
- replaceVariableByText
- replaceVariableByWordFragment
- replaceVariableByWordML
- setTemplateSymbol
- setTemplateBlockSymbol
pdx:replaceVariableByWordML
Replaces placeholder variables by plain WordML code.
Note
You are reading the XML API documentation. For the PHP API method please go to replaceVariableByWordML.
Description
Element definition
This element (avalaible for the seasoned phpdocx user) allows the direct substitution of placeholder variables by WordML code.
Only use this element if you really understand the OOXML standard. phpdocx does not validate the WordML against any scheme so you have to make sure by your own that the WordML is correctly encoded. Moreover, this element does not take care by its own of internal/external relationships included in the WordML code.
Attributes and sub-elements
variable
The names of the placeholder template variables and the WordFragment instances that should replace them as values.
options
Key | Description |
---|---|
firstMatch | If the variable appears more than once within the Word document and firstMatch is set to true, phpdocx will only replace the first ocurrence of the variable within the Word document. |
target | Possible values are: document. This option sets the scope of the replacement procedure. |
replaceType | Possible values are:
|