<div dir="ltr">mb you should delete first line in file<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 11, 2015 at 9:13 PM,  <span dir="ltr"><<a href="mailto:jollailija@gmail.com" target="_blank">jollailija@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Doesn't work, onCompleted says "file:///usr/share/harbour-nettiradio/qml/Pages/StationLists/xml/asemat.xml".<br>
<br>
On another note, the thing under it in the console says "Error FODC0002 in tag:<a href="http://trolltech.com" rel="noreferrer" target="_blank">trolltech.com</a>,2007;QmlXmlPatterns:QIODeviceVariable:src, at line 1, column 38: Encountered incorrectly encoded content."<br>
Does that mean something is wrong with the xml file?<br>
<div class="HOEnZb"><div class="h5"><br>
Kimmo Lindholm kirjoitti pe joulukuuta 11 19:59:18 2015 GMT+0200:<br>
> Try one more:<br>
><br>
> source: Qt.resolvedUrl("xml/asemat.xml")<br>
><br>
> And to debug, add this:<br>
><br>
> Component.onCompleted: {<br>
>         console.log(source.toString())<br>
> }<br>
><br>
> -kimmo<br>
><br>
> -----Original Message-----<br>
> From: <a href="mailto:devel-bounces@lists.sailfishos.org">devel-bounces@lists.sailfishos.org</a> [mailto:<a href="mailto:devel-bounces@lists.sailfishos.org">devel-bounces@lists.sailfishos.org</a>] On Behalf Of <a href="mailto:jollailija@gmail.com">jollailija@gmail.com</a><br>
> Sent: 11. joulukuuta 2015 19:26<br>
> To: <a href="mailto:devel@lists.sailfishos.org">devel@lists.sailfishos.org</a><br>
> Subject: [SailfishDevel] XmlListModel can't fetch data from a local .xml file<br>
><br>
> 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?<br>
><br>
> If you need to take a look at the code, you can find it at <a href="https://github.com/jollailija/nettiradio" rel="noreferrer" target="_blank">https://github.com/jollailija/nettiradio</a><br>
> The xml file I'm trying to read is asemat.xml adn the list model file is StationsModel.qml<br>
><br>
> Cheers,<br>
> jollailija<br>
> --<br>
> Lähetetty Jollastani<br>
> _______________________________________________<br>
> SailfishOS.org Devel mailing list<br>
> To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a><br>
> _______________________________________________<br>
> SailfishOS.org Devel mailing list<br>
> To unsubscribe, please send a mail to devel-unsubscribe@lists.sailfishos.or<br>
<br>
--<br>
Lähetetty Jollastani<br>
_______________________________________________<br>
SailfishOS.org Devel mailing list<br>
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a></div></div></blockquote></div><br></div>