【发布时间】:2011-05-16 16:23:33
【问题描述】:
是否遵循有效的 UPnP 控制响应?他们是否必须在 <OutProfile> 的值中转义这些字符? UPnP device architecture1.1(sec 3.2.4) 表示如果参数值包含
<?xml version="1.0"?><s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:SetABCResponse
xmlns:u="urn:schemas-upnp-org:service:Client:1"><OutProfile><cProfile>
<cID>0</cID>
<iconPreference>
<mimetype>image/bmp</mimetype>
<width>32</width>
<height>32</height>
<depth>24</depth>
</iconPreference>
</cProfile>
</OutProfile></u:SetABCResponse></s:Body></s:Envelope>
【问题讨论】:
-
您应该简单地使用 XML API 来创建您的 XML。它会知道转义规则是什么,这样你就不必了。