Note that there are some explanatory texts on larger screens.

plurals
  1. POWhich XML structure is best suited for an all round API?
    text
    copied!<p>Please advise if you can.</p> <p>I am building an SMS web service API that will allow people to send SMS to their desired cellphone numbers. A request will be sent to the interface, we then process that request based on the account details provided and credits available on their account.</p> <p>We have two proposed XML structures for the interface request and I would like you to advise which one is better as we are going at each others throats about it.</p> <p>Interface A</p> <pre><code>print("&lt;?xml version = "1.0" encoding="UTF-8" standalone="yes"?&gt; &lt;Message version="1.0"&gt; &lt;ClientID&gt;11111&lt;/ClientID&gt; &lt;PassPhrase&gt;shjfkh&lt;/PassPhrase&gt; &lt;Request Type="sms" Refno="10" ToAddress="27732687745332"&gt; &lt;Content&gt; hello world &lt;/Content&gt; &lt;/Request&gt; &lt;/Message&gt; "); </code></pre> <p>Interface B</p> <pre><code> print("&lt;?xml version = "1.0" encoding="UTF-8" standalone="yes"?&gt; &lt;Message&gt; &lt;mmtag name="Version"&gt;1.0&lt;/mmtag&gt; &lt;mmtag name="ClientID"&gt;1001&lt;/mmtag&gt; &lt;mmtag name="RefNO"&gt;120&lt;/mmtag&gt; &lt;mmtag name="Encoding"&gt;base64&lt;/mmtag&gt; &lt;mmtag name="Type"&gt;SMS&lt;/mmtag&gt; &lt;mmtag name="Content"&gt;hello world&lt;/mmtag&gt; &lt;mmtag name="MSISDN"&gt;27781010102&lt;/mmtag&gt; &lt;/Message&gt;"); </code></pre> <p>Now, looking at the two examples, which do you think would be best-suited for our API interface, regardless of the technology in the back end. Please support your answer should you pick one.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload