xml/cap problems
| From: | Tom Shaw | Date: | Sat, 21 Aug 2010 21:53:44 +0000 |
| Subject: | xml/cap problems | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-307625@lists.php.net to get a copy of this message | ||
I am trying to decode and encode nws compatible cap xml. An example is at the bottom of this post. simplexml_load_file works fine if "cap:" is removed before processing. However, if it is not simplexml_load_file does not parse the file at all and libxml_get_errors returns no errors.
Any and all help is appreciated.
Tom
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<cap:alert xmlns:cap='http://www.incident.com/cap/1.0'>
<cap:identifier>NOAA-NWS-ALERTS National 2010-08-21T13:26:34-04:00</cap:identifier>
<cap:sender>w-nws.webmaster@noaa.gov</cap:sender>
<cap:sent>2010-08-21T13:26:34-04:00</cap:sent>
<cap:status>Actual</cap:status>
<cap:msgType>Alert</cap:msgType>
<cap:scope>Public</cap:scope>
<cap:note>
Current Watches, Warnings and Advisories for the United States Issued by the National Weather Service
</cap:note>
<cap:references>http://www.weather.gov/alerts/us.html</cap:references>
<cap:info>
<cap:category>Met</cap:category>
<cap:event>na</cap:event>
<cap:urgency>Unknown</cap:urgency>
<cap:severity>Unknown</cap:severity>
<cap:certainty>Unknown</cap:certainty>
<cap:headline>
Current Watches, Warnings and Advisories for Alaska Issued by the National Weather Service
</cap:headline>
<cap:web>http://www.weather.gov/alerts/us.html#ak</cap:web>
</cap:info>
....