0

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.

2
  • is this XML or jSON you have added? Commented Dec 18, 2016 at 12:00
  • FileReader.readAsText + DOMParser. Commented Dec 18, 2016 at 12:04

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.