I am currently trying to parse the XML returned from the getSeries.php, but the parsing won't work as I want it to.
Currently I am getting the XML with cURL
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, "$mirrorpath/api/GetSeries.php?seriesname=$show_name");
and parse it with SAX
$currentTag = strtolower($tag);
$currentTag = null;
global $data, $currentTag;
$data[$currentTag] = $characters;
But when I want to echo the results I always get mistakes when it comes to & and '.
When there is a &
in the title it is seen as a new show and '
is changed to some other symbols
and also lets the parser think it is a new show.
for($count=0; $count < count($data["seriesid"]); $count++)
echo "<td>" . $data["seriesname"][$count] . "</td>";
echo "<td class='input'>" . $data["seriesid"][$count] . "</td>";
Does anyone have a solution for this problem?
Like letting the parser completely ignore what is between the tags.
I tried replacing & with "and", but this doesn't really solve the problem for other characters.
Thanks in advance