...
Code Block |
---|
<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE msg_core SYSTEM "msg_core.dtd"> <DOCUMENT MODE="normal"> <SENDER password="xxxxx"> <ADDRESS type="EMAIL" role="FROM" value="name@company.com"></ADDRESS> </SENDER> <REPLYTO> <ADDRESS type="EMAIL" role="REPLYTO" value="name@company.com"></ADDRESS> </REPLYTO> <SMS> <HEADER>SMS From</HEADER> <FOOTER>my signature</FOOTER> </SMS> <MESSAGE > <ADDRESS type="SMS" role="TO" value="0410507753" status="INITIATOR" priority="1"></ADDRESS> <SUBJECT> Example </SUBJECT> <BODY type="TEXT"> <PAYLOAD> Test SMS Message using XML. </PAYLOAD> </BODY> </MESSAGE> </DOCUMENT> |
Notes
Root element:
<DOCUMENT/> | attribute mode should be set to NORMAL, optional. |
...
Reply to information (for response/confirmation purpose):
As for SENDER above but role = REPLYTO
SMS meta information:
<SMS/> |
|
<HEADER/> | this is the source address of the message |
<FOOTER/> | optional text to be appended to each message |
Message:
<MESSAGE/> | id is for custom message id, optional. |
<ADDRESS/> | id is for custom address id, optional.
|
<BODY/> | (see examples) |
<PAYLOAD/> | (see examples) |
CDATA
- Everything inside a CDATA section is ignored by the parser.
- If your text contains a lot of "<" or "&" characters - as program code often does - the XML element can be defined as a CDATA section.
- A CDATA section starts with "<![CDATA[" and ends with "]]>":
Examples:
Single SMS
The following is an example of sending one message to a single person
...