Hybrid View

  1. #1
    Ext User mrkadakia's Avatar
    Join Date
    Jul 2008
    Posts
    131
    Vote Rating
    0
    mrkadakia is on a distinguished road

      0  

    Default How to read XML files in ExtJS locally?

    How to read XML files in ExtJS locally?


    Hi all -
    I am using ExtJS locally for development.

    The XML Grid Example on the Samples page runs fine:

    http://extjs.com/deploy/dev/examples/grid/xml-grid.html

    but when I try to run the same example from the extjs directory, the XML data does not get loaded:

    ext-2.2\examples\grid\xml-grid.html

    This is a major roadblock to me. Could someone suggest me on how can I run these examples locally?

    Thanks
    - K

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    94
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Publish them on a local webserver (Apache?).

    (or you could use the ext-basex user extension to add local file access support)

  3. #3
    Ext User mrkadakia's Avatar
    Join Date
    Jul 2008
    Posts
    131
    Vote Rating
    0
    mrkadakia is on a distinguished road

      0  

    Default


    Hi Condor,
    Thank you for your response.

    I would like to use ext-basex user extension but I do not know how to use it.

    I had found a thread by Doug Hendricks:

    http://extjs.com/forum/showthread.php?p=52350#post52350

    but it has so many posts that it is turning out to be really difficult to follow. So, if you don't mind, I would appreciate if you could tell me in simple steps on what should I do to run these XML examples locally?

    Thanks
    - K

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    4
    tryanDLS is on a distinguished road

      0  

    Default


    If you can't read/follow that thread, I would say you shouldn't be using that extension. Start from the top of it and look at Doug's examples and code. It's not difficult to use if you take the time to understand it.

  5. #5
    Ext User mrkadakia's Avatar
    Join Date
    Jul 2008
    Posts
    131
    Vote Rating
    0
    mrkadakia is on a distinguished road

      0  

    Default


    tryanDLS,
    You are referring to the following thread right?

    http://extjs.com/forum/showthread.php?t=21681

    Earlier, I pasted the thread on localXHR.js and then I later realized that there is a separate thread on Ext-baseX.

    Correct me if I am wrong.

    Thanks
    - K

  6. #6
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    94
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Use the ext-basex.js file from this post.

    ps. You might need to set:
    Code:
    Ext.lib.Ajax.forceActiveX = true;
    to make Ext use ActiveX for IE instead of XmlHttpRequest (which doesn't support local file access).
    Also, in Firefox you can only access file below your current directory (or you need to change a security.fileuri.strict_origin_policy in about:config).