2017 © Pedro Peláez
 

library lib-array2xml

Array2XML conversion library credit to lalit.org

image

openlss/lib-array2xml

Array2XML conversion library credit to lalit.org

  • Thursday, November 10, 2016
  • by nullivex
  • Repository
  • 4 Watchers
  • 82 Stars
  • 977,253 Installations
  • PHP
  • 42 Dependents
  • 2 Suggesters
  • 21 Forks
  • 3 Open issues
  • 14 Versions
  • 13 % Grown

The README.md

Testing the bug

Array2XML conversion library credit to lalit.org, (*1)

Usage

//create XML
$xml = Array2XML::createXML('root_node_name', $php_array);
echo $xml->saveXML();

//create Array
$array = XML2Array::createArray($xml);
print_r($array);

Array2XML

@xml example:, (*2)

// Build the array that should be transformed into a XML object.
$array = [
    'title' => 'A title',
    'body' => [
        '@xml' => '<html><body>

The content for the news item, (*3)

</body></html>', ], ]; // Use the Array2XML object to transform it. $xml = Array2XML::createXML('news', $array); echo $xml->saveXML();

This will result in the following., (*4)


<news>
  <title>A title</title>
  <body>
    <html>
      <body>
        <p>The content for the news item</p>
      </body>
    </html>
  </body>
</news>

Reference

More complete references can be found here http://www.lalit.org/lab/convert-xml-to-array-in-php-xml2array/ http://www.lalit.org/lab/convert-php-array-to-xml-with-attributes/, (*5)

Changelog

1.0.0

  • Add ability for callbacks during processing to check status.

0.5.1

  • Fix fata error when the array passed is empty fixed by pull request #6

0.5.0

  • add second parameter to XML2Array::createArray for DOMDocument::load, e.g: LIBXML_NOCDATA
  • change method visibility from private to protected for overloading
  • Merge pull request #5 to add child xml
  • Merge pull request #4 to change method visibility and add second parameter for load.

0.1.0

  • Initial Release

The Versions

10/11 2016

dev-master

9999999-dev http://openlss.org

Array2XML conversion library credit to lalit.org

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.2

 

xml array xml conversion array conversion

10/11 2016

0.5.1

0.5.1.0 http://openlss.org

Array2XML conversion library credit to lalit.org

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.2

 

xml array xml conversion array conversion

02/11 2016

0.5.0

0.5.0.0 http://openlss.org

Array2XML conversion library credit to lalit.org

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.2

 

xml array xml conversion array conversion

16/09 2015

0.0.10

0.0.10.0 http://openlss.org

Array2XML conversion library credit to lalit.org

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.2

 

xml array xml conversion array conversion

27/03 2013

dev-0.0.x-dev

dev-0.0.x-dev http://openlss.org

Array2XML conversion library credit to lalit.org

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.2

 

xml array xml conversion array conversion

27/03 2013

0.0.6

0.0.6.0 http://openlss.org

Array2XML conversion library credit to lalit.org

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.2

 

xml array xml conversion array conversion

27/03 2013

0.0.7

0.0.7.0 http://openlss.org

Array2XML conversion library credit to lalit.org

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.2

 

xml array xml conversion array conversion

27/03 2013

0.0.8

0.0.8.0 http://openlss.org

Array2XML conversion library credit to lalit.org

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.2

 

xml array xml conversion array conversion

27/03 2013

0.0.9

0.0.9.0 http://openlss.org

Array2XML conversion library credit to lalit.org

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.2

 

xml array xml conversion array conversion

26/03 2013

0.0.5

0.0.5.0 http://openlss.org

Array2XML conversion library credit to lalit.org

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.2

 

xml array xml conversion array conversion

26/03 2013

0.0.4

0.0.4.0 http://openlss.org

Array2XML conversion library credit to lalit.org

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.2

 

xml array xml conversion array conversion

23/03 2013

0.0.3

0.0.3.0 http://openlss.org

Array2XML conversion library credit to lalit.org

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.2

 

xml array xml conversion array conversion

23/03 2013

0.0.2

0.0.2.0 http://openlss.org

Array2XML conversion library credit to lalit.org

  Sources   Download

Apache-3.0+

The Requires

  • php >=5.3.2

 

xml array xml conversion array conversion

23/03 2013

0.0.1

0.0.1.0 http://openlss.org

Array2XML conversion library credit to lalit.org

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.2

 

xml array xml conversion array conversion