I am trying to parse a Bing search XML result, but whenever I try to access an XML element there is colon in every element.
It gives the error
Parse error: syntax error, unexpected ':' in /
Here is my PHP code
foreach ($searchresponse->web:Web->web:Results as $result)
{
printf("
%s", $result->web:Description);
}
Here is the Bing XML response,
<SearchResponse Version="2.2">
-
<Query>
<SearchTerms>ipl</SearchTerms>
</Query>
-
<web:Web>
<web:Total>2430000</web:Total>
<web:Offset>0</web:Offset>
-
<web:Results>
-
<web:WebResult>
<web:Title>Indian Premier League | IPLT20</web:Title>
What is the meaning of colon in XML tags?