adduc/cdata-simplexml

Wrapper around SimpleXMLElement to provide cdata support.

Installs: 8 158

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 0

pkg:composer/adduc/cdata-simplexml

1.0.0 2018-08-05 08:51 UTC

This package is not auto-updated.

Last update: 2025-10-10 17:59:34 UTC


README

This library adds a wrapper around the SimpleXMLElement class to allow creating CDATA elements.

Usage

<?php

use Adduc\SimpleXMLElement;

$data = '<test/>';
$xml = new SimpleXMLElement($data);
$xml->addCData('element', 'Test Data');
echo $xml->asXml();
// <test><element><![CDATA[Test Data]]></element></test>