How can I extract data of an external XML to PHP?

Newbee Ajax with Xml question?

  • I read this two w3schools samples http://www.w3schools.com/ajax/tryit.asp?filename=tryajax_httprequest_js http://www.w3schools.com/ajax/tryit.asp?filename=tryajax_httprequest_js4 Like these samples I want to get data which is in a xml file but with one difference, I don't want to get all nodes. I want only one of them. I mean, imagine this fallowing is my xml file; <Root> <Data id="1"> ... </Data> <Data id="2"> ... </Data> <Data id="3"> ... </Data> </Root> I only want to get <Data id="2"> 's innerXML for example. If i get all the xml file, this will be an unnecessary load for server/client. Because I only need one Data per connection. BUT!!.. I want to do it just with javascript on a html file and a xml file(they are on the same domain/server and same folder). Not with asp php etc... No server side any code. Just HTML + Javascript => Ajax => Xml 's only one Node Can it be done? If not, I will make three seperate Xml Files, which three of them has only one of three data node. Thanks..

  • Answer:

    AJAX represents front-end back-end interaction, so you will NEED a back-end like PHP or ASP!

Witchy at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.