New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

adduc/cdata-simplexml

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adduc/cdata-simplexml

Wrapper around SimpleXMLElement to provide cdata support.

Source
Packagist
Version
1.0.0
Version published
Total downloads
14K
Maintainers
0
Created
Source

CData for SimpleXMLElement

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>

FAQs

Package last updated on 05 Aug 2018

Related posts