Hey David,
There's quite a few ways to get th data you're asking. If you're using
PHP5 you can use SimpleXML (http://us2.php.net/simplexml) which would
be really straight forward. Somewhere along the lines of $xml-
>Response->Placemark->Point->coordinates or if you feel like using
xpath somethin
the regex approach could be useful if you validate the xml against a
DTD before parsing..
another approach would be using http://www.php.net/simplexml
SimpleXML, it is really straightforward even if you are not familiar
with typical SAX/DOM parsers!
On May 4, 5:50 pm, Mike52 <[EMAIL PROTECTED]>
You could get the value in a "quick-and-dirty" way by using a regex.
The function below takes the xml data as a string and you pass it the
name of the tag:
function getTagValue($xmldata, $tag) {
$pattern = "/<$tag>(.*)<\/$tag>/";
preg_match($pattern, $xmldata, $matches);
ret
Hey folks,
I'm fairly new to Cake, so bear with me. My question is about Cake's
XML class:
Specifically, I'm trying to parse an XML file like this:
723 Chestnut Street, Philadelphia, PA 19106
200
geocode
723 Chestnut St, Philadelphia, PA 19106, USA