Action: AddElementToDOM

Purpose: Quick Action for creating a new Element with its associated attributes and text and appending it to a specified Node.

The OID of the newly-created Element will be returned in the response

Action-specific name/value pairs:

Parameter Name Description
TagName The TagName for the new Element that is to be created
ParentOID The OID of the Node that will be the new node's Parent Node.
Attribute.[no].Name (optional*) You can add any number of attributes to the new Element. Each one is distinguished by a unique number (no).

You specify the attribute name of the noth attribute using this parameter. For example Attribute.1.Name=myAttribute
Attribute.[no].Value (optional*) You specify the value of the noth attribute using this parameter. For example Attribute.1.Value="1234"
Text (optional) Text to be added to the new Element. Text must be appropriately URL-encoded.
AsFirstChild (optional) If present and set to true, this parameter instructs M/DB:X to add the new tag as the new first child of the specified parent Node.

By default, the new Element will otherwise be added as the new last child of the specified parent Node.

* If one or more attributes are to be added, then there must be a matching Attribute.[no].Name and Attribute.[no].Value parameter for each attribute.

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

{TagName:"myNewTag",Text:"Hello World",ParentOID:"1-3",Attributes:{myAttribute:1234,id:"x12"}}

Note that if you are specifying the new Element using JSON, the Attributes are simply defined as a sub-object named Attributes.

Example Request

Example Request

&MDBAccessKeyId=[your access key id]
&Signature=[computed signature]


&MDBAccessKeyId=[your access key id]
&Signature=[computed signature]

This request will add the following tag as the new last child of the Node whose OID is 1-3:

<myNewTag id='x12' myAttribute='1234'>Hello World<myNewTag>

Example Response


<?xml version='1.0'?>
<AddElementToDOMResponse xmlns="">

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


In this example, the new Element has been created with a NodeOID of 1-28.