Okay. Here's the code.
XML Parsing Error: not well-formed
<item_to_page_title><![CDATA[Breaking news, real-time scores and daily analysis from Sports Illustrated SI.com]]></item_to_page_title>
The error tracking line thing points to the []-like char as the problem. I've set the page to UTF-8 and still it doesn't work.
No, I can't just take the []-like car out. This is an API I'm working on, so I can't edit the content. Only deliver it. Is there a workaround? The CDATA tags aren't doing a thing here..
-EDIT-
This is the only line in the output error. Here's the PHP source:
$output .= "<activity>\n";
$result = mysql_query($query, $con);
while($row = mysql_fetch_array($result)){
$result2 = mysql_query("SELECT * FROM sites WHERE id = '".$row['u_to']."'", $con);
$row2 = mysql_fetch_array( $result2 );
$output .= "<item> \n";
$output .= "<item_type>" . $row['u_type'] . "</item_type> \n";
$output .= "<item_to_page_id>" . $row['u_to'] . "</item_to_page_id> \n";
$output .= "<item_to_page_url><![CDATA[".$row2['s_url']."]]></item_to_page_url> \n";
$output .= "<item_to_page_title><![CDATA[".$row2['s_title']."]]></item_to_page_title> \n";
$output .= "<item_date>" . $row['u_date'] . "</item_date> \n";
$output .= "</item> \n";
}
$output .= "</activity>\n";
The MySQL queries and such work fine. If I limit the MySQL query (not included in that snippet) so that it doesn't output as many results (thus meaning that the result with the error causing character isn't returned), it works fine. But I need this to be bulletproof, so I need to find a workaround for this character ... or whatever is causing the problem.