Why XML is SUX
Ini adalah sebuah sample kecil kenapa XML itu SUX. Sample ini diambil dari log transaksi SMS dengan protokol MM7.
--fh-mms-multipart-boundary-28418
Content-Type: text/xml; charset="utf-8"
Content-ID: <cid-0003F7FA34C58BE@3>
<?xml version="1.0" encoding="UTF-8"?>
<soap-env:Envelope
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/soap-envelope.xsd">
<soap-env:Header>
<TransactionID
soap-env:mustUnderstand="1"
xmlns="http://www.firsthop.com/specs/MM7-extended/MM7-extended-1-3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.firsthop.com/specs/MM7-extended/MM7-extended-1-3 MM7-extended-1-3.xsd"
>fh-transaction-id-0003F7FA34F5785</TransactionID>
</soap-env:Header>
<soap-env:Body>
<DeliverReq
xmlns="http://www.firsthop.com/specs/MM7-extended/MM7-extended-1-3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.firsthop.com/specs/MM7-extended/MM7-extended-1-3 MM7-extended-1-3.xsd">
<MM7Version>5.5.0-extended</MM7Version>
<LinkedID>routerSMSNode1@cs01cwbp:177057</LinkedID>
<Sender><Number>+628XXXXXXXX</Number></Sender>
<Recipients><To><ShortCode>XXXX</ShortCode></To></Recipients>
<TimeStamp>2008-06-03T13:01:29-00:00</TimeStamp>
<Content allowAdaptations="true" href="<00003F7FA2F5435A@XXXXXX.com>" type="SMS" />
</DeliverReq>
</soap-env:Body>
</soap-env:Envelope>
--fh-mms-multipart-boundary-28418
Content-Type: text/plain
Content-ID: <00003F7FA2F5435A@XXXXXXX.com>
hello world
--fh-mms-multipart-boundary-28418--
Setelah melalui SOAP parser aplikasi saya, hasilnya adalah — straightly taken from application log:
2008-06-03 20:02:22,534 [btpool0-23] INFO - deliver: trxid=fh-transaction-id-0003F7FA34F5785,linkid=routerSMSNode1@cs01cwbp:177057,msisdn=628XXXXXXX,src=XXXX,ts=2008- 06-03 20:01:29,msg=Hello World
Dari snippet XML yg penuh dengan tag2, ternyata yg berguna cuman segitu. Yg lain: nyampah… Whua…. udah debugnya susah, nulisnya susah, implementasinya dimana2.
Wednesday, June 4th, 2008 | Tags: Rants, XML | 8 Comments