Maileon PHP client  1.5.5
Easily integrate your PHP application with Maileon.
XMLUtils.php
1 <?php
2 
3 
11 {
12 
18  static function appendChild(SimpleXMLElement $to, SimpleXMLElement $from)
19  {
20  $toDom = dom_import_simplexml($to);
21  $fromDom = dom_import_simplexml($from);
22  $toDom->appendChild($toDom->ownerDocument->importNode($fromDom, true));
23  }
24 
30  static public function addChildAsCDATA($parent, $name, $value = NULL)
31  {
32  $new_child = $parent->addChild($name);
33 
34  if ($new_child !== NULL) {
35  $node = dom_import_simplexml($new_child);
36  $no = $node->ownerDocument;
37  $node->appendChild($no->createCDATASection($value));
38  }
39 
40  return $new_child;
41  }
42 }
static addChildAsCDATA($parent, $name, $value=NULL)
Definition: XMLUtils.php:30
static appendChild(SimpleXMLElement $to, SimpleXMLElement $from)
Definition: XMLUtils.php:18