I am trying to connect to the answerbase api using AngularJs. I got it to return the xml using jsonp but I get a format error. Unfortunately xml is the only format they will return. I have attempted to use the xml2json library with no success. This is what I have so far.
var url = "http://myAnswerBaseSite.com/api/getquestionslist.aspx?apikey=myKey&callback=JSON_CALLBACK";
$http.jsonp(url,
{
transformResponse: function (data) {
var x2js = new X2JS();
var json = x2js.xml_str2json(data);
return json;
}
})
.success(function (data) {
console.log(data.found);
});
Is this possible? Thanks in advance