[thelist] XML and Javascript: 2 questions

Marcus Andersson marcus at bristav.se
Fri Oct 1 07:20:00 CDT 2004


Peter-Paul Koch wrote:
>>Question 1:
>>Can someone tell me if javascript can be used to load and parse an XML
>>document if the javascript is on one web site (xyz.domain.com) and the
>>XML is on another (abc.domain.com)?
> 
> 
> JavaScript cannot access files that come from another server, so the
> answer is No.

Let's say you are using XmlHttp in Moz or IE (preferably with Sarissa). Can't you do that then?

Since the requestor asks about parsing XML I'll guess she'll be using (should be using) one of those 
components. If not, then I agree (and using XmlHttp somewhat forces that you control the deployment 
environment, ie intranet).

/Marcus


More information about the thelist mailing list