Wednesday, August 11, 2010

XML, Abused

The world is full of examples of XML being abused. Here's the worst I've seen today.


<?xml version="1.0" encoding="ISO-8859-1"?>.<BroadsoftDocument protocol="OCI" xmlns="C" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<sessionId xmlns="">4FD7482390BF8F4DBA4D5B7BF494AD2C</sessionId>
<command echo="" xsi:type="SystemDeviceTypeGetAvailableListResponse14sp1" xmlns="">
<deviceType>2Wire HomePortal</deviceType>
<deviceType>ACT P103SLC</deviceType>
<deviceType>Adtran TA904</deviceType>
<typeInfo>
<profile>Intelligent Proxy Addressing</profile>
<staticRegistrationCapable>false</staticRegistrationCapable>
<protocolChoice>SIP 2.0</protocolChoice>
<isIpAddressOptional>true</isIpAddressOptional>
<useDomain>true</useDomain>
</typeInfo>
<typeInfo>
<profile>Intelligent Proxy Addressing</profile>
<staticRegistrationCapable>false</staticRegistrationCapable>
<protocolChoice>SIP 2.0</protocolChoice>
<isIpAddressOptional>true</isIpAddressOptional>
<useDomain>true</useDomain>
</typeInfo>
<typeInfo>
<profile>Intelligent Proxy Addressing</profile>
<staticRegistrationCapable>false</staticRegistrationCapable>
<protocolChoice>SIP 2.0</protocolChoice>
<isIpAddressOptional>true</isIpAddressOptional>
<useDomain>true</useDomain>
</typeInfo>
<typeInfo>
<profile>Intelligent Proxy Addressing</profile>
<staticRegistrationCapable>false</staticRegistrationCapable>
<configType>2 File Configuration</configType>
<protocolChoice>SIP 2.0</protocolChoice>
<isIpAddressOptional>true</isIpAddressOptional>
<useDomain>true</useDomain>
</typeInfo>
</command>




This means, among other things, that the device type "Adtran TA904" has configuration type "2 File Configuration".

The XML schema designer sent back the data as two separate arrays. To decode the meaning, you have to create two ordered list and line them up like so many buttons and buttonholes.

No comments: