The UpnpDownloadXmlDoc() function cannot download deviceinfoservice.xml from Belkin Wemo smart plug. The root cause is leading UTF-8 BOM (\xef\xbb\xbf) in the XML caused parse error. Several Microsoft software (Example: notepad) puts leading BOM into UTF-8 text files.
The fix of the issue is detecting and skipping leading UTF-8 BOM at the start of parsing XML document.
The
UpnpDownloadXmlDoc()
function cannot downloaddeviceinfoservice.xml
from Belkin Wemo smart plug. The root cause is leading UTF-8 BOM (\xef\xbb\xbf
) in the XML caused parse error. Several Microsoft software (Example: notepad) puts leading BOM into UTF-8 text files. The fix of the issue is detecting and skipping leading UTF-8 BOM at the start of parsing XML document.