Releases: fawno/SimpleXMLExtended
Releases · fawno/SimpleXMLExtended
No trim with strip_spaces = false
New asText method
1.1.1 New asText method
New methods
- Dinamic methods:
- parentNode()
- removeChild()
- removeNode()
- Static methods:
- importDOM
- loadFile
- loadXML
- loadHTML
SimpleXMLExtended v1.0.0
SimpleXMLElement Extended class
SimpleXMLExtended add a new method for create CData nodes.
Also added a new method for output e nice format XML.
Example
require 'src/SimpleXMLExtended.php';
use Fawno\SimpleXMLExtended\SimpleXMLExtended;
$root = new SimpleXMLExtended('<?xml version="1.0" encoding="UTF-8"?><root/>');
$root->addChildCData('node_cdata', 'data as cdata');
print_r($root->asXML());
/*
Output:
<?xml version="1.0" encoding="UTF-8"?>
<root><node_cdata><![CDATA[data as cdata]]></node_cdata></root>
*/
print_r($root->formatXML());
/*
Output:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<node_cdata><![CDATA[data as cdata]]></node_cdata>
</root>
*/