And for XML you use E4X:

https://mail.gnome.org/archives/gnome-shell-list/2012-November/msg00021.html
https://developer.mozilla.org/en-US/docs/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.luc...@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 <meg...@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

Reply via email to