I have this html code, to do xpath on it:
<b>Random Field:</b>
<p>
A random field describes an <a href="/index.php?page=glossary&term_id=230">
experiment</a> with outcomes being functions of more than one continuous variable,
for example U(x,y,z), where x, y, and z are coordinates in space. Random field is
extension of the concept of <a href="/index.php?page=glossary&term_id=598">random
process</a> into the case of multivariate argument.
</p>
I tried this to take the text inside the <p> tag:
$dom = new DomDocument();
$dom->loadHtml($curl_scraped_page);
$xpath = new DomXPath($dom);
print $xpath->evaluate('string(//p[preceding::b]/text())');
But it just gave me this:
A random field describes an
What I want is:
A random field describes an ..(an so on until).. of multivariate argument.
So I'm guessing the problem lies on the <a> tag. Cause every time I tried to do this on the same-patterned document, it stops right before this <a> tag.
Thanks..