0

request a remote xml

hi guys,
i have a some requests about this js function: y.rest(url).accept('application/xml').get().response;

using this i make a request to a remote service and specifing with the accept i should receive a xml. is it right? another question: without the accept what is the format? jonathan have responsed to me yet but maybe i have not understand... is it an E4X?

and finally the most important question : i can use the sentence y.rest(url).get().respose only one time in the javascript or i can use it every time i want?
i make this request because i want to elaborate an xml received fron the first url and then use an attribute from this xml to form a second url that i want to use to call another service, using again the y.rest finction. so is it possible?

thanks a lot!

by
2 Replies
  • QUOTE (Samuele @ Apr 13 2010, 06:05 AM) <{POST_SNAPBACK}>
    hi guys,
    i have a some requests about this js function: y.rest(url).accept('application/xml').get().response;

    using this i make a request to a remote service and specifing with the accept i should receive a xml. is it right? another question: without the accept what is the format? jonathan have responsed to me yet but maybe i have not understand... is it an E4X?

    and finally the most important question : i can use the sentence y.rest(url).get().respose only one time in the javascript or i can use it every time i want?
    i make this request because i want to elaborate an xml received fron the first url and then use an attribute from this xml to form a second url that i want to use to call another service, using again the y.rest finction. so is it possible?

    thanks a lot!


    Yes you can do all that - its just a program you are writing using Javascript - you can make lots of network calls, create XML, combine XML etc etc.

    I'd take a look at various examples around the web:

    http://developer.yahoo.net/blog/archives/2...ql_execute.html (look at the sources for each of the examples)

    and there are more detailed tutorials on yql's own blog site:

    http://www.yqlblog.net/blog/category/tutorial/

    Jonathan
    0
  • QUOTE (Jonathan @ Apr 13 2010, 09:54 AM) <{POST_SNAPBACK}>
    Yes you can do all that - its just a program you are writing using Javascript - you can make lots of network calls, create XML, combine XML etc etc.

    I'd take a look at various examples around the web:

    http://developer.yahoo.net/blog/archives/2...ql_execute.html (look at the sources for each of the examples)

    and there are more detailed tutorials on yql's own blog site:

    http://www.yqlblog.net/blog/category/tutorial/

    Jonathan


    ok thanks a lot!!!
    0

Recent Posts

in YQL