Hello,

I've searched everywhere and can't find a specific answer to my
problem.  I have a certain function which posts to a backend.php
file.  The php file generates some XML which is returned to the
callback function.  The problem is that it alerts "<!--[CDATA[<li>Some
element</li>]]-->" (it also adds hyphens) but it doesn't get
appended.  I've tried setting the 4th $.post parameter to "xml",
changed the xml encoding, etc.

Javascript:

$.post("backend.php", {
   foo: bar
}, function(xml) {
   var data = $("data", xml).html();
   alert(data);
   some_tag.append(data);
});


backend.php:

echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
echo "<response>\n";
echo "\t<data><![CDATA[<li>Some element</li>]]></data>\n";
echo "</response>";

Reply via email to