Re: XML in an extension



E4X has been removed from recent Mozilla JS versions, so please use something like GXml instead.


On Wed, Dec 18, 2013 at 6:54 PM, Amy <mathematical coffee gmail com> wrote:
And for XML you use E4X:

    content = Shell.get_file_contents_utf8_sync('/path/to/file'); // or your preferred file-reading function
    // remove <?xml version=...?> (developer.mozilla.org/en-US/docs/E4X)        
    content = content.replace(/^<\?xml\s+version\s*=\s*(["']).*?\1[^?]*\?>/, '');
    xml = new XML(content);

On 19 December 2013 08:15, Rovanion Luckey <rovanion luckey gmail com> wrote:
To import a JSON-file in JS is very simple, instructions can be found here: http://www.json.org/js.html


2013/12/7 Megh Parikh <meghjp gmail com>
How to use XML (or JSON) file from internet and interpret it?

Also why have extensions not been reviewed from a long time

_______________________________________________
gnome-shell-list mailing list
gnome-shell-list gnome org
https://mail.gnome.org/mailman/listinfo/gnome-shell-list



_______________________________________________
gnome-shell-list mailing list
gnome-shell-list gnome org
https://mail.gnome.org/mailman/listinfo/gnome-shell-list



_______________________________________________
gnome-shell-list mailing list
gnome-shell-list gnome org
https://mail.gnome.org/mailman/listinfo/gnome-shell-list




--
  Jasper


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]