Action: ModifyTextData

Purpose: Change the text of a Text Node.

More formally stated, this Action changes the Data property of a Text Node

This Action may only be applied to Text Nodes. Attempting to use it with any other Node Type will return an error. The Text Node must already exist to use this Action.

See also ModifyElementText which can be a quicker and easier alternative to the more primitive ModifyTextData Action.

Action-specific name/value pairs:

Parameter Name Description
TextNodeOID The Text Node whose text you want to change
Text The new replacement text

Alternatively, the parameters above can be incorporated into a single JSON string and specified using the parameter name JSON, eg:

{TextNodeOID:"6-12",Text:"This is replacement text for the selected TextNode"}

Example Request

Action=ModifyTextData
&MDBAccessKeyId=[your access key id]
&Signature=[computed signature]
&SignatureMethod=HmacSHA256
&SignatureVersion=2
&Text=This%20is%20replacement%20text%20for%20the%20selected%20TextNode
&TextNodeOID=6-12
&Timestamp=2009-06-14T13%3A19%3A41
&Version=2009-04-15
&db=mdbx

or:

Action=ModifyTextData
&JSON=%7BTextNodeOID%3A%226-12%22%2CText%3A%22This%20is%20replacement%20text%20for%20
 the%20selected%20TextNode%22%7D
&MDBAccessKeyId=[your access key id]
&OutputFormat=JSON
&Signature=[computed signature]
&SignatureMethod=HmacSHA256
&SignatureVersion=2
&Timestamp=2009-06-14T13%3A19%3A41
&Version=2009-04-15
&db=mdbx

Example Response

XML

<?xml version='1.0'?>
<ModifyTextDataResponse xmlns="http://mdbx.mgateway.com/doc/2009-06-05/">
   <ModifyTextDataResult>
      <TextNodeOID>
         6-12
      </TextNodeOID>
   </ModifyTextDataResult>
</ModifyTextDataResponse>

JSON (ie if OutputFormat=JSON specified in the Request)

{TextNodeOID:"6-12"}

The response returns the OID of the text node that was changed as a result of this Action.