[SailfishDevel] XmlListModel can't fetch data from a local .xml file
Andrey Kozhevnikov
coderusinbox at gmail.com
Fri Dec 11 18:24:13 UTC 2015
http://docs.basex.org/wiki/XQuery_Errors
FODC0002 The specified document resource cannot be retrieved.
------ Исходное сообщение ------
От: jollailija at gmail.com
Кому: devel at lists.sailfishos.org
Отправлено: 11.12.2015 23:13:35
Тема: Re: [SailfishDevel] XmlListModel can't fetch data from a local
.xml file
>Doesn't work, onCompleted says
>"file:///usr/share/harbour-nettiradio/qml/Pages/StationLists/xml/asemat.xml".
>
>On another note, the thing under it in the console says "Error FODC0002
>in tag:trolltech.com,2007;QmlXmlPatterns:QIODeviceVariable:src, at line
>1, column 38: Encountered incorrectly encoded content."
>Does that mean something is wrong with the xml file?
>
>Kimmo Lindholm kirjoitti pe joulukuuta 11 19:59:18 2015 GMT+0200:
>> Try one more:
>>
>> source: Qt.resolvedUrl("xml/asemat.xml")
>>
>> And to debug, add this:
>>
>> Component.onCompleted: {
>> console.log(source.toString())
>> }
>>
>> -kimmo
>>
>> -----Original Message-----
>> From: devel-bounces at lists.sailfishos.org
>>[mailto:devel-bounces at lists.sailfishos.org] On Behalf Of
>>jollailija at gmail.com
>> Sent: 11. joulukuuta 2015 19:26
>> To: devel at lists.sailfishos.org
>> Subject: [SailfishDevel] XmlListModel can't fetch data from a local
>>.xml file
>>
>> Hi! Since Nettiradio is ... a net radio, I figured I could use a xml
>>file hosted on GitHub as a update-able station database. It works like
>>a charm, but in case GitHub goes down or something, I'd like to have a
>>local copy shipped with every release. However, XmlListModel doesn't
>>seem to like reading local files. I have tried all kinds of local path
>>urls but I can't get it working. What am I doing wrong?
>>
>> If you need to take a look at the code, you can find it at
>>https://github.com/jollailija/nettiradio
>> The xml file I'm trying to read is asemat.xml adn the list model file
>>is StationsModel.qml
>>
>> Cheers,
>> jollailija
>> --
>> Lähetetty Jollastani
>> _______________________________________________
>> SailfishOS.org Devel mailing list
>> To unsubscribe, please send a mail to
>>devel-unsubscribe at lists.sailfishos.org
>> _______________________________________________
>> SailfishOS.org Devel mailing list
>> To unsubscribe, please send a mail to
>>devel-unsubscribe at lists.sailfishos.or
>
>--
>Lähetetty Jollastani
>_______________________________________________
>SailfishOS.org Devel mailing list
>To unsubscribe, please send a mail to
>devel-unsubscribe at lists.sailfishos.org
More information about the Devel
mailing list