Accessing XML / REST web service

Hi guys,

I wish to access data of an XML as below:






<line_1>1 TREMELO GREEN</line_1>







<line_1>2 TREMELO GREEN</line_1>








<postcode>RM8 1DL</postcode>



How can get this data into arrays so I can pass that on to the form. Here is the URL of the web service:

Awaiting response from Yii world.


To be able to help we will need more info.

The provided link - is that a yii based site?

Right now, based on your link, I am assuming you want to access a web sevice via REST from another site. As you may already know, there are now WSDL for REST and neither is there a common interface. I would suggest straight up php SimpleXML to interact with the XML?

The key thing here is that you would have to work with the structure of the xml document.

$uri = '[url=""][/url]';

$crafty = new SimpleXMLElement($uri, NULL, true);

$array = $crafty->xpath(/xpath/query/to/access/node);

foreach ($array as $delivery)


   	// do what you gotta do here


or you could pass array to render()