3 Replies Latest reply on Jul 14, 2008 9:01 AM by Joe ... Ward

    loading xml from javascript in an HTML component

    mediaD
      Hello,

      I'm creating an AIR app with Flex Builder. This application contains an HTML component which I use too display any simple websites. These websites are on the hard drive.

      The problem is that my web site contains a javascript menu which loads an XML File. 2 ways to load this XML file:

      - xmlDoc= document.implementation.createDocument("","",null);
      xmlDoc.load("xml/menu.xml");
      xmlDoc.onload=displaymessage;
      ...
      or
      - using an XmlHttpRequest object.

      Unfortunately both solutions seems to be inefficient.

      The first one return that :
      exceptionValue: TypeError: Value undefined (result of expression xmlDoc.load) is not object.
      Which is not a big surprise because Safari don't have this object neither.

      For the second one I have:
      exceptionValue: Error: Permission denied

      So does anyone know how can I load my xml file (or a JSON file I don't mind), without communicating with the AIR application to get this file.

      Thanks…