locked
Any good sample on the way to handle Web service and XMl parsing for WinRt? RRS feed

  • Question

  • Dear all,

    I need to build a windows store app that should work either on desktop or WinRt.

    The main things about the app is that it connects to web service url in order to receive XML data that need to be parse for processing. Data return is a list of cars with pictures and associated PDF

    Based on that I have following questions :

    1 - What is the best approach to read this xml feeds coming from web service in async mode ?

    2- Would it be better to store locally all return cars, pictures, and pdf ( WinRt or Desktop) and then request regular sync update ? 

    Thanks for help

    regards

    serge


    Your knowledge is enhanced by that of others.


    Thursday, October 10, 2013 8:06 PM

Answers

  • i do not think you can build a database that could be hit by WinRT and Desktop App simply, it look that you will have to make 2 independent logic for the desktop and the WinRT app.

    1- Download all XML file identifying a cars and then store the picture and document somewhere in IsolationStorage on WInRT or Hard drive of Win 8 Pro

    2- Then update the URL path identifying initial pictures or document to be the new local path

    Is that what you mean ?

    yes this what i mean.

    Saturday, October 12, 2013 11:19 AM

All replies

  • hi serge,

    sure it will be better to store your files locally, as it will provide faster user experience , which is better, check this sample

    http://code.msdn.microsoft.com/Offline-Caching-938d83e3

    it should help you to get data from an web service and cache it 

    • Proposed as answer by Ahmed-Fouad Thursday, October 10, 2013 9:07 PM
    Thursday, October 10, 2013 9:06 PM
  • THnaks for your reply.

    In my scenarios, the web service will return 1 xml file per car.
    Then I would need to browse each receive files for each cars in order to get the http URL where pictures and document are located for a particular car.

    SO in fact I would need to make 2 web services call actually.

    So if I understood your approach of offline I shoould :

    1- Download all XML file identifying a cars and then store the picture and document somewhere in IsolationStorage on WInRT or Hard drive of Win 8 Pro

    2- Then update the URL path identifying initial pictures or document to be the new local path

    Is that what you mean ?

    I an an other issue :

    From my application, the user will have to select a list of cars first based on a criteria like for instance all cars which are used for RACING type.

    In such case, I will have to scann all XML file to identify the type of each cars, might be time consuming would it be better that I build an external database that could be hit by WinRT app and Desktop App ?

    In case of a remote database, how can I efficiently implement a caching mecanism for WinRT and Desktop?

    Regards


    Your knowledge is enhanced by that of others.

    Friday, October 11, 2013 7:05 AM
  • i do not think you can build a database that could be hit by WinRT and Desktop App simply, it look that you will have to make 2 independent logic for the desktop and the WinRT app.

    1- Download all XML file identifying a cars and then store the picture and document somewhere in IsolationStorage on WInRT or Hard drive of Win 8 Pro

    2- Then update the URL path identifying initial pictures or document to be the new local path

    Is that what you mean ?

    yes this what i mean.

    Saturday, October 12, 2013 11:19 AM