Reputation: 4705
I have the following URL:
http://en.wikipedia.org/wiki/Special:Export/Birkdale,_Queensland
I want to get the following out of it:
pop = 13,460 (2006 census)
lga = Redland City
dist1 = 44
near-nw = [[Thorneside, Queensland|Thorneside]]
| near-n =
| near-ne = [[Wellington Point, Queensland|Wellington Point]]
| near-w = [[Ransome, Queensland|Ransome]]
| near-e = [[Wellington Point, Queensland|Wellington Point]]
| near-sw = [[Capalaba West, Queensland|Capalaba West]]
| near-s = [[Capalaba, Queensland|Capalaba]]
| near-se = [[Alexandra Hills, Queensland|Alexandra Hills]]
I want to return them as variables, for example:
$pop = "13,460 (2006 census)";
$lga = "Redland City";
$distance = 44;
$nearnw = "Thorneside";
$nearn = "";
$nearne = "Wellington Point";
$nearw = "Ransome";
$neare = "Wellington Point";
$nearsw = "Capalaba West";
$nears = "Capalaba";
$nearse = "Alexandra Hills";
How would I go about extracting the information from this XML file and putting them into variables exactly like explained above?
Thank you.
Upvotes: 1
Views: 831