Action: GetPrefix

Purpose: Returns the Prefix property of a specified Element. If a TagName is prefixed (eg <ewd:myTag>), the Prefix is the part of the name that precedes the colon (:) (eg ewd). If the TagName is not prefixed, this Action returns an empty response.

See also: GetLocalName

Action-specific name/value pairs:

Parameter Name Description
ElementOID The OID of the Element whose Prefix property is to be retrieved.

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

{ElementOID:"1-4"}

Example Request

Action=GetPrefix
&ElementOID=1-4
&MDBAccessKeyId=[your access key id]
&Signature=[computed signature]
&SignatureMethod=HmacSHA256
&SignatureVersion=2
&Timestamp=2009-06-14T13%3A19%3A41
&Version=2009-04-15
&db=mdbx

or:

Action=GetPrefix
&JSON=%7BElementOID%3A%221-4%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'?>
<GetPrefixResponse xmlns="http://mdbx.mgateway.com/doc/2009-06-05/">
   <GetPrefixResult>
      <Prefix>
         ewd
      </Prefix>
   </GetPrefixResult>
</GetPrefixResponse>

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

{Prefix:"ewd"}

If the TagName is not prefixed, an empty response will be returned:

<?xml version='1.0'?>
<GetPrefixResponse xmlns="http://mdbx.mgateway.com/doc/2009-06-05/">
   <GetPrefixResult />
</GetPrefixResponse>

or:

{Prefix:""}