Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML
que estoy haciendo mal este es mi codigo
Código PHP:
<?php
$data = "http://alerts.weather.gov/cap/tx.php?x=1";
$library = file_get_contents($data);
$library = new SimpleXMLElement($library);
echo '<table>';
echo '<tr>';
echo '<th>Title</th>
<th>Author</th>
<th>Publisher</th>
<th>ISBN</th>';
echo '</tr>';
foreach( $library->book as $book ) {
echo '<tr>';
echo '<td>' . $book->entry . '</td>';
echo '<td>' . $book->published . '</td>';
echo '<td>' . $book->name . '</td>';
echo '<td>' . $book->title . '</td>';
echo '</tr>';
}
echo '</table>';
?>