[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Maximally Consumable Data

  • From: "Costello, Roger L." <costello@m...>
  • To: <xml-dev@l...>
  • Date: Mon, 7 Apr 2008 14:18:18 -0400

RE:  Maximally Consumable Data
Hi Mukul,

> IMHO, what's different (great) about this scenario?

I need to give more detail about how it works.

A JavaScript Ajax application that is running in a browser can only
fetch data from the domain that it came from.  It does this using the
XMLHttpRequest object.

Quoting now from Bulletproof Ajax: 

"We can't use XMLHttpRequest to access the Web APIs offered by so many
sites these days.  That's a real shame because most APIs return their
data in XML, which would be available in responseXML.  

The script element has no such security restrictions.  It's possible to
access a JavaScript file from another domain in this way:

<script type="text/javascript"
 
src="http://www.xfront.com/us_states/json/javascript/us_states.js"></sc
ript>

If you can request a JavaScript file from another domain, then you can
also request a JSON file.  Remember, JSON is nothing more than
JavaScript."

-- the author shows how this can be generated dynamically --

Thus, through this technique, the JavaScript running in your browser
can pull in data from any web service that serves up JSON (such as the
Yahoo web services).

/Roger


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.