如何更换
 在文字?

XML:

<programme start="20180124160000 +0200" stop="20180124164500 +0200" channel="506"><title lang="he">&#13;
         ריזולי ואיילס 7 11. הגופה</title><desc lang="he">&#13;
         מתח. 11. הגופה: גופתו של קברן נמצאת בתוך ארון קבורה של אחד מלקוחותיו והדבר מוביל את חברי הצוות לחשיפת גופות נוספות. ג'יין מבשרת לקרוביה על החלטתה לעבור לאף.בי.איי.</desc></programme></programmes>

I want to remove from the text all the &#13;

How to remove it with str_replace?

PHP:

$c = $xpath->query("div[@class = 'show']/text()", $container)->item(0);
$desc = $c->nodeValue;}
$desc = str_replace("&#13;", "", $desc);
$echo desc;

It seems that somewhere along the line, the string has been html-encoded.

You can decode it again using:

html_entity_decode('thisisa&#13;test')

or:

html_entity_decode($your_encoded_string)

See here how it works.

The parser will do it for you:

$document = new DOMDocument();
$document->loadXml('<foo>&#13;</foo>');
var_dump($document->documentElement->textContent);

Output:

string(1) "
"

The var_dump() output shows that the string contains only a single character - a carriage return. However the parser will do this only for normal text nodes, not for CDATA sections:

$document = new DOMDocument();
$document->loadXml('<foo><![CDATA[&#13;]]></foo>');
var_dump($document->documentElement->textContent);

Output:

string(5) "&#13;"

In this you need to use string functions to replace the entity manually.

Tip: With DOMXpath::evaluate() you can fetch the text content directly as a string by using the string function to cast the node list:

$description = $xpath->evaluate("string(div[@class = 'show'])", $container);