dmx/simple-xml-parser

A simple XML Parser which parses an XML into a normalized array based on SimpleXMLElement.

1.0.3 2019-09-09 08:39 UTC

This package is auto-updated.

Last update: 2024-04-09 18:55:21 UTC


README

A simple XML Parser which parses an XML into a normalized array based on SimpleXMLElement.

Requirements

  • PHP >= 7.2
    • Extensions
      • json
      • simplexml
      • libxml
  • Composer >= 1.5

Installation

Use composer to install and use this package in your project.

Install them with

composer require "dmx/simple-xml-parser"

and you are ready to go!

Usage

Example:

$myXMLContent = <<<XML
<xml>
    <foo>
        <bar awesome="true">this is a example</bar>
    </foo>
</xml>
XML;

$myContent = (new DMX\SimpleXML\Parser($myXMLContent))->toArray();

Development - Getting Started

See the CONTRIBUTING file.

Changelog

See the CHANGELOG file.

License

See the LICENSE file.