Action: OutputFromId

Purpose: Outputs a sub-tree of a specified DOM, starting from the Element with the specified id attribute.

Note: This Action was introduced in Build 3.

Action-specific name/value pairs:

Parameter Name Description
id The value of the id attribute whose owner Element will be at the top of the DOM sub-tree that is outputted.
DocumentName or DocumentOID The Name or OID of the document containing the sub-tree

Example Request

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

Example Response

XML

<foo id="theid" location="Drumcondra">
   <bar name="Cat and Cage">
      pub 1
   </bar>
   <bar name="Fagan's" owner="John" tied="true">
      pub 2
   </bar>
   <offlicense name="oddbins" />
   <bar name="Gravedigger's">
      pub 3
   </bar>
   <bar name="Ivy House">
      pub 4
   </bar>
</foo>

Note that only the tags in the sub-tree will be output. M/DB:X will not add any other tags or wrappers to the output.

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

{foo:{id:"theid",location:"Drumcondra",bar:[{name:"Cat and Cage",#text:"pub 1"},
 {name:"Fagan's",owner:"John",tied:"true",#text:"pub 2"},
 {name:"Gravedigger's",#text:"pub 3"},{name:"Ivy House",#text:"pub 4"}],
 offlicense:{name:"oddbins"}}}

M/DB:X uses the following rules for converting XML to JSON: