Click here to Skip to main content
15,908,768 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I use PHP to extract a number from a website by XPath. I realized that there is a problem with extraction of data from such an HTML code:
XML
<html xmlns="http://www.w3.org/1999/xhtml">
the inside content...
</html>

and i use such xpath query:
/html/text()

it does not recognize the inside content unless i remove xmlns part from the HTML tag.
i want to fetch a number from this website:
http://www.sarafideniz.com/
which has such an XPath:
/html/body/div/div[4]/div/div/div/div/div/div/div/div/div/div/div/div/table/tbody/tr/td[3]/span/strong/text()

and there is a similar problem.
I used this website to check the xpath and I am sure that my PHP code has no problem.
is there anybody that can helpl?

thanks in advance
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900