php xpath with text() and SimpleXMLElement->xpath not in line with xpath expected results
问题 I'm trying to get all text nodes of /td/span. I'm trying with xpath /td/span/text() The problem is it's returning ALL the text nodes for every text element (there are two here, "193" and "120", it returns "193120" twice, instead of 193 and 120 in separate elements). I try the exact same xpath on any online tool, it works fine, in php, completely different results. using SimpleXMLElement $xhtmlSnippet = '<td><span>193<span>10</span><span></span><div>66</div><span>195</span><span>.</span><span