DomQuery::escapeValue();

Evaluates a string and determines whether it must be wrapped in a CDATA tag.

 $DomQuery = new DomQuery;
 $string = 'Bangers & Mash';
 if(($string = $DomQuery->escapeValue($string)) instanceof DOMCDATASection)
 {
     $Root = $DomQuery->createElement('root');
     $Root->appendChild($string);
 }

Definition:

public function escapeValue($string)

Parameters:

Name Type Description
$string String The XML source document.

Recent Discussions

No discussions yet!