Click to See Complete Forum and Search --> : New to XML


zapbrannigan
01-20-2010, 03:13 AM
Hi,

I have been asked to provide some real-time feeds from a site that uses XML, but the feed is not a normal .xml link, it is given to me with a userid & password, for example:

http://www.domainname.co.uk/List1.aspx?user=username&pwd=password

In Firefox this URL will give me the normal XML feed, but I need to be able to extract this using PHP.

I'm not very confident in using XML, but understand I need to parse the XML feed and have been told by the providers of the data that I should be able to extract using a simple CGI which they have provided me with using the HttpRequest.

I have been able to parse using PHP, but the trouble is I can't seem to pick out each of the elements. For example, I have a news title under the <title> element and a link under the <URL> element, but want to wrap round HTML so that the <URL> element is the linking to the <title> element if that makes sense?!

Charles
01-20-2010, 05:32 AM
This is more of a PHP question and what you are trying to accomplish is pretty straight forward. You'll need the PHP cURL (http://us2.php.net/manual/en/book.curl.php) and DOM (http://us2.php.net/manual/en/book.dom.php) modules. Just read the documentation and the examples and it'll all make sense.