Re: Re: Need help... getting information from external xml document
| From: | Matt M. | Date: | Thu, 23 Sep 2004 15:26:02 +0000 |
| Subject: | Re: Re: Need help... getting information from external xml document | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-197705@lists.php.net to get a copy of this message | ||
> As John noted at the end... I do not have control over the format of
> the XML... but thanks.... I will try... BTW i am using PHP4 is
> SimpleXML able to be used and if so how?
I would just use John's regex idea, I am guessing (i could be wrong
though, I have been many times before) that the format is not going to
change much
$str =
file_get_contents('http://www.dhs.gov/dhspublic/getAdvisoryCondition');
preg_match('/CONDITION="([^"]+)"/',$str,$match);
echo $match[1];