Bug in XML formatting of metadata section (UPnP notifications / responses)
#1
I have just installed XBMC "PRE-11.0 GIT:20111020-bc49ac0 (Compiled: Oct 20 2011)" and see a problem with XML formatting of UPnP notifications - the metadata portion.

The SetAVTransportURI SOAP looks like:
Code:
<?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:SetAVTransportURI xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><InstanceID>0</InstanceID><CurrentURI>http://192.168.2.213/youtube.mp4</CurrentURI><CurrentURIMetaData>&lt;DIDL-Lite xmlns=&quot;urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/&quot; xmlns:dc=&quot;[url]http://purl.org/dc/elements/1.1/&quot;[/url] xmlns:upnp=&quot;urn:schemas-upnp-org:metadata-1-0/upnp/&quot;&gt;&lt;item id=&quot;1&quot; parentID=&quot;0&quot; restricted=&quot;true&quot;&gt;&lt;upnp:class&gt;object.item.videoItem.movie&lt;/upnp:class&gt;&lt;dc:title&gt;&lt;/dc:title&gt;&lt;res protocolInfo=&quot;http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_NTSC;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01700000000000000000000000000000*&quot; &gt;http://192.168.2.213/youtube.mp4&lt;/res&gt;&lt;/item&gt;&lt;/DIDL-Lite&gt;</CurrentURIMetaData></u:SetAVTransportURI></s:Body></s:Envelope>

The LastChange response looks good, except for the MetaData section:
Code:
&lt;CurrentTrackMetaData val="&amp;lt;DIDL-Lite xmlns=&amp;quot;urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/&amp;quot; xmlns:dc=&amp;quot;[url]http://purl.org/dc/elements/1.1/&amp;quot;[/url] xmlns:upnp=&amp;quot;urn:schemas-upnp-org:metadata-1-0/upnp/&amp;quot;&gt;&amp;lt;item id=&amp;quot;1&amp;quot; parentID=&amp;quot;0&amp;quot; restricted=&amp;quot;true&amp;quot;&gt;&amp;lt;upnp:class&gt;object.item.videoItem.movie&amp;lt;/upnp:class&gt;&amp;lt;dc:title&gt;&amp;lt;/dc:title&gt;&amp;lt;res protocolInfo=&amp;quot;http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_NTSC;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01700000000000000000000000000000*&amp;quot; &gt;http://192.168.2.213/youtube.mp4&amp;lt;/res&gt;&amp;lt;/item&gt;&amp;lt;/DIDL-Lite&gt;"/&gt;

Please, take a look at the following element:
Code:
&amp;lt;upnp:class&gt;
The "<" is properly twice escaped, thus "&amp;lt;" However, the ">" is only escaped once, thus "&gt;"

All elements in the metadata section are escaped the same way (left twice, right once), what is causing parsing problems on the controller side.

jacek
Reply

Logout Mark Read Team Forum Stats Members Help
Bug in XML formatting of metadata section (UPnP notifications / responses)0