Okay, so I created a php file that was supposed to create an XML file which would later be used in an AJAX call. However I get this error when I try to look at the XML:
[CODE]XML Parsing Error: not well-formed
Location: http://bellevue.com/includes/getByCategory.php
Line Number 1, Column 121:<?xml version=”1.0″ encoding=”UTF-8″?><markers><marker lat=”43.65654″ lng=”-79.90138″ html=”Some stuff to display in the<br>First Info Window” label=”Test” /></markers>
————————————————————————————————————————^
You can check the error out for yourself at [url]http://bellevue.com/includes/getByCategory.php
I was having a problem with my responseXML because of this so I narrowed it down to the actual php file. Here’s the php code:
[code=php]<?php
header(“Content-type: text/xml”);
echo ‘<?xml version=”1.0″ encoding=”UTF-8″?>’;
echo ‘<markers>’;
require(“prep.php”);
$category = “Asian”;
$query = “SELECT * FROM restaurants WHERE category = ‘$category'”;
$result = mysql_query($query) or die(“Query failed: “. mysql_error());
while($row = mysql_fetch_array($result)) {
echo ‘<marker lat=”‘, $row[‘lat’], ‘” lng=”‘, $row[‘lng’], ‘” html=”‘, $row[‘description’], ‘” label=”‘, $row[‘name’], ‘” />’;
}
echo ‘</markers>’;
?>
Any ideas? Much thanks!