×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    4

    N9 / Harmattan cannot open xml file

    I create a xml file from the data I download from web using Qt C++ backend and UI created with QML.

    I save data to /home/user/MyDocs/w_g.xml

    XmlListModel seems not to be able to open it,nothing comes out from it, count = -1.

    If I use data directly from web (with url) XmlListmodel shows it just fine.
    File has read permissions.

    Any ideas what could be the problem ? (note that this is working fine with N8, E7 etc + win7 desktop).

  2. #2
    Super Contributor
    Join Date
    May 2008
    Location
    Helsinki, Finland
    Posts
    1,098

    Re: N9 / Harmattan cannot open xml file

    Hi there, jtb63 and welcome to the discussion board!

    If it is a local xml file it may be that you are attempting to read data inside namespace but not declaring you are using it.

    To fix that declare that you will default namespace on your queries:

    XmlListModel {
    ...
    namespaceDeclarations: "declare default element namespace'<use your namespace here>"
    ...
    }

    Hope this helps,

    Best Regards,
    Marko
    [FONT="Comic Sans MS"][COLOR="Blue"][/COLOR][I]Marko Lumivuori
    Technical Support
    +358 40 8019330
    [email]marko.lumivuori@nokia.com[/email][/I][/FONT]

  3. #3
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: N9 / Harmattan cannot open xml file

    Obviously path is the problem, how do you define source in XmlListModel?

  4. #4
    Registered User
    Join Date
    Jun 2011
    Posts
    4

    Re: N9 / Harmattan cannot open xml file

    Thanks for all your responses so far.

    source: "/home/user/MyDocs/w_g.xml "

    And namespace should not be the problem as I already said this is working fine in desktops and in Symbian.

  5. #5
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: N9 / Harmattan cannot open xml file

    What is output of
    ls -l /home/user/MyDocs/w_g.xml
    ?
    Should not source be
    "file:///home/user/MyDocs/w_g.xml"
    ?

  6. #6
    Registered User
    Join Date
    Jun 2011
    Posts
    4

    Re: N9 / Harmattan cannot open xml file

    Quote Originally Posted by divanov View Post
    What is output of
    ls -l /home/user/MyDocs/w_g.xml
    ?
    Should not source be
    "file:///home/user/MyDocs/w_g.xml"
    ?
    Thousand thanks! That was it, now it works (after adding "file://"). Is this mentioned somewhere in documentation ? At least I have not seen it.

  7. #7
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: N9 / Harmattan cannot open xml file

    Not in XmlListModel documentation at least.

  8. #8
    Super Contributor
    Join Date
    May 2008
    Location
    Helsinki, Finland
    Posts
    1,098

    Re: N9 / Harmattan cannot open xml file

    @Daniil - I must say it is true, I can't find it in that doc either.
    [FONT="Comic Sans MS"][COLOR="Blue"][/COLOR][I]Marko Lumivuori
    Technical Support
    +358 40 8019330
    [email]marko.lumivuori@nokia.com[/email][/I][/FONT]

  9. #9
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: N9 / Harmattan cannot open xml file

    Ok, I'll file a bug about this if some friendly soul tells me if this is more related to the Qt documentation or the MeeGo 1.2 Harmattan SDK documentation... I am guessing Qt documentation, but I might be wrong...
    Anyone? Anyone? :-)

    Hartti

  10. #10
    Super Contributor
    Join Date
    May 2008
    Location
    Helsinki, Finland
    Posts
    1,098

    Re: N9 / Harmattan cannot open xml file

    @Daniil? =)

    Best,
    Marko
    [FONT="Comic Sans MS"][COLOR="Blue"][/COLOR][I]Marko Lumivuori
    Technical Support
    +358 40 8019330
    [email]marko.lumivuori@nokia.com[/email][/I][/FONT]

  11. #11
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: N9 / Harmattan cannot open xml file


Similar Threads

  1. Replies: 14
    Last Post: 2011-05-30, 03:49
  2. QtMobility 1.1.1: Cannot open include file: 'QMessage': No such file or directory
    By RajeevSahu in forum [Archived] Qt Mobility Project
    Replies: 2
    Last Post: 2011-03-15, 17:37
  3. Replies: 0
    Last Post: 2010-09-08, 14:06
  4. how to open an xml file?
    By sotobanjar in forum Mobile Java General
    Replies: 10
    Last Post: 2009-03-17, 12:37

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×