Re: Structures_DataGrid Data Sources
| From: | Olivier Guilyardi | Date: | Sun, 22 Aug 2004 01:45:31 +0000 |
| Subject: | Re: Structures_DataGrid Data Sources | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-32805@lists.php.net to get a copy of this message | ||
Joshua Eichorn wrote:
That's very nice. I now just need a way to figure out which php version the script is running on. I'm going to rtfm about that, or maybe simply use method_exists()... Thanks -- ogMaybe that I'll hack some support for a little subset of xpath, when detecting php5. This could even be a new option, like xpath_light, much lighter, to do simple things like "/path/to/root".Xpath with the DOM extension in php5 is quite easy, im sure a simple wrapper to provide the api you need would be easy. <?php // Hello World in PHP5 Dom with Xpath $src = ' <hello>World</hello> '; $xml = DomDocument::loadXml($src); $xpath = new DomXpath($xml); $result = $xpath->query("//hello"); echo $result->item(0)->nodeName." ".$result->item(0)->textContent."\n"; ?>