Skip to content

Releases: fawno/SimpleXMLExtended

No trim with strip_spaces = false

20 Feb 10:32
Compare
Choose a tag to compare
1.1.2

No trim with strip_spaces = false

New asText method

15 Jan 11:39
Compare
Choose a tag to compare
1.1.1

New asText method

New methods

19 Dec 17:21
Compare
Choose a tag to compare
  • Dinamic methods:
    • parentNode()
    • removeChild()
    • removeNode()
  • Static methods:
    • importDOM
    • loadFile
    • loadXML
    • loadHTML

SimpleXMLExtended v1.0.0

15 Dec 08:07
Compare
Choose a tag to compare

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>
  */