WC_Moip_SimpleXML

Extends the SimpleXMLElement class to add CDATA element.

Defined (1)

The class is defined in the following location(s).

/includes/class-wc-moip-simplexml.php  
  1. class WC_Moip_SimpleXML extends SimpleXMLElement { 
  2.  
  3. /** 
  4. * Add CDATA. 
  5. * @param string $string Some string. 
  6. */ 
  7. public function addCData( $string ) { 
  8. $node = dom_import_simplexml( $this ); 
  9. $no = $node->ownerDocument; 
  10. $node->appendChild( $no->createCDATASection( $string ) );