Lohmeyer Posted May 30, 2008 Share Posted May 30, 2008 can anyone tell me how i can use external xml files on the link below..http://w3schools.com/dom/tryit.asp?filename=try_dom_nodetype..instead of the "book.xml" there would be an external file.. Link to comment Share on other sites More sharing options...
Synook Posted May 30, 2008 Share Posted May 30, 2008 Do you mean external as on a different server? Link to comment Share on other sites More sharing options...
Lohmeyer Posted May 30, 2008 Author Share Posted May 30, 2008 yes..do i need an xml parser first before i can use the external file on that script? or some kinda declaration? ...im really new to this stuff Link to comment Share on other sites More sharing options...
Synook Posted May 31, 2008 Share Posted May 31, 2008 Due to security restrictions that JavaScript fragment (or any purely client-side method) cannot obtain external files. You could use a server-side language to bring the XML to your server before retrieving it with the JavaScript - e.g. using http://static.php.net/manual/en/function.f..._get_contents() in PHP.All parsing can be done client-side. That is what the DOM functions of JS are for. Link to comment Share on other sites More sharing options...
Lohmeyer Posted May 31, 2008 Author Share Posted May 31, 2008 thanks alot! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.