Replaces all occurrences of a match on an XPath in an XML document with the specified expression.


Properties

XmlDocument

Type: Xml Input
The XML document to be searched

XPath

Type: String Input
The XPath expression to evaluate against the document.

Namespaces

Type: Multiline Text Input
A list of namespaces that are referenced in the XML Document and/or XPath expression. For Example:

ns:tempuri.org
ns2:otheruri.org

Replace

Type: List Input
InnerText - Replace the inner text of the match
OuterXml - Replace the outer XML (ie. including the matched Node)
InnerXml - Replace the inner XML of the match
Insert - Append the value in ReplaceWith after the matched Node
Remove - Remove the matched Node (ReplaceWith is ignored)
The type of operation that is required to be completed on the XML document

ReplaceWith

Type: Multiline Text Input
The value that you wish to be inserted into the XML document. This may be text or XML.

Output

Type: Xml Output
The Translated document.

Remarks

Use this Processor to easily rename, replace or remove sections in an XML document.

Examples

Using the XML structure below as an input

<Root>
<Test1>This</Test1>
<Test2>is</Test2>
<Test3>a</Test3>
<Test4>statement</Test4>
</Root>



Provide an XPath of Root/Test4 with Repalce set to InnerText  to produce the following result:

<Root>
<Test1>This</Test1>
<Test2>is</Test2>
<Test3>a</Test3>
<Test4>test</Test4>
</Root>

See Also

XPath Match

Did this answer your question?