Question: I checked for the session cookie in edge and it was not available. In chrome, the session cookie works fine. I tried both php superglobal `$_SESSION[]` and the magic getter `$this->session->set_userdata($newdata);` while setting session

Here are the session config values:

```
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'cekosessions';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = 'cekosessions';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;

```

Here are the cookie config values:

```
$config['cookie_prefix'] = 'ncitce';
$config['cookie_domain'] = 'localhost';
$config['cookie_path'] = '/';
$config['cookie_secure'] = FALSE;
$config['cookie_httponly'] = TRUE;

```

Answer: 
```js
var data = 
"<root>\
    <instructions>Some ins text.</instructions>\
    <options>\
       <option>1.png</option>\
       <option>2.png</option>\
       <option>3.png</option>\
       <option>4.png</option>\
    </options>\
    <noOfOptions>4</noOfOptions>\
</root>";

var xml = $.parseXML(data);
var $data = $( xml );

var instructions = $data.find("instructions").text();
var options = [];
$data.find("option").each(function(){
  options.push($(this).text());
});

console.log("instructions: " + instructions);
console.log("options: ", options);
```

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
```
If your structure is fixed, You can try this:

```
 var data = 
"<root>"+
    "<instructions>Some ins text.</instructions>"+
    "<options>"+
      " <option>1.png</option>"+
       "<option>2.png</option>"+
      " <option>3.png</option>"+
      " <option>4.png</option>"+
   " </options>"+
   " <noOfOptions>4</noOfOptions>"+
   "<instructions>Some ins text1.</instructions>"+
   "<options>"+
     " <option>1.png</option>"+
      "<option>2.png</option>"+
     " <option>3.png</option>"+
     " <option>4.png</option>"+
  " </options>"+
  " <noOfOptions>4</noOfOptions>"+
"</root>";
xml = $.parseXML(data);
var arr=[];
    var arr=[];
    $("instructions", xml).each(function (index,val) {

        arr[index]=[];
        arr[index]['instructions']=$(this).text();
        arr[index]['option']=[];
        $("option",$(val).next()).each(function(){
            arr[index]['option'].push($(this).text());
        });
        arr[index]['noOfOptions']=[];
        arr[index]['noOfOptions']=$($(val).next()).next().text();

        });
    console.log(arr);

```

**Console OUTPUT:**

> 
> [Array[0], Array[0]]0: Array[0]instructions: "Some ins text."length:
>  0noOfOptions: "4"option: Array[4]**proto**: Array[0]1: Array[0]length:
>  2\_\_proto\_\_: Array[0]
> 
> 
> 

[Fiddle](https://jsfiddle.net/bu8a33n2/1/)

If you need the entire data as json(can vbe converted in jquery array/object) you can use: [xml2json](http://dfsq.github.io/xml2json/#.WI7gsx9NxNw)