Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 8, 2024 via composer

openlss/lib-array2xml 1.0.0

Array2XML conversion library credit to lalit.org
Package summary
Share
0
issues
1
license
1
Apache-2.0
Package created
23 Mar 2013
Version published
29 Mar 2019
Maintainers
2
Total deps
1
Direct deps
0
License
Apache-2.0

Issues

0
This package has no issues

Licenses

Apache License 2.0

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
use-patent-claims
place-warranty
Cannot
hold-liable
use-trademark
Must
include-copyright
include-license
state-changes
include-notice
1 Packages, Including:
openlss/lib-array2xml@1.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of openlss/lib-array2xml 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does openlss/lib-array2xml do?

Openlss/lib-array2xml is a PHP package that is essentially an array-to-XML conversion library. It's designed to effortlessly transform PHP arrays into XML format, and vice versa, presenting developers with an easy-to-use interface to handle array to XML conversions. Moreover, it is designed to directly integrate into PHP applications.

How do you use openlss/lib-array2xml?

The openlss/lib-array2xml library is utilized in PHP code through a series of intuitive steps. Initially, you import the library, then you can create an XML object out of a PHP array and output this XML. Here is a code example that summarizes the usage:

// Assuming the library has been imported.

// The array you want to convert to XML.
$php_array = [
    'title' => 'Your title here',
    'body' => [
        '@xml' => '<html><body><p>Your content here</p></body></html>',
    ],
];

// Convert the array to XML.
$xml = Array2XML::createXML('root_node_name', $php_array);

// Print the resulting XML.
echo $xml->saveXML();

You can also convert XML back to an array using the following code:

// Assuming the XML has been generated.

// Convert the XML back to an array.
$array = XML2Array::createArray($xml);

// Print the resulting array.
print_r($array);

Note that the 'root_node_name' in the createXML function should be replaced with the name of the root node for your specific context.

Where are the openlss/lib-array2xml docs?

Openlss/lib-array2xml documentation and more comprehensive references are available at the following URLs:

  1. http://www.lalit.org/lab/convert-xml-to-array-in-php-xml2array/
  2. http://www.lalit.org/lab/convert-php-array-to-xml-with-attributes/

These pages offer a more detailed look into the operation of the library, including various options and fine-tuning possibilities. Please note that the documentation is independent of the package and is attributed to lalit.org. The GitHub repository of the project does not directly provide a detailed documentation of the package.