Converting XML Blob in Javascript

1.6k views Asked by At

I'm getting back a Blob of XML using Vue-Resource and would like to convert this into a Javascript Object Array.

var books = []
this.$http.get('http://someurl/books.xml')
  .then((response) => {
    this.books = response.data
    console.log(response.data)
  })

I would then like to be able to access for example book.title from the object array.

The console displays the XML data (Blob {size: 4548, type: "application/xml"}) but I'm not sure how to proceed.

0

There are 0 answers