<commit_before>XmlConverter
=========
Small class converting xml to associative array

This class is based on the work of <NAME> (original code: http://www.lalit.org/lab/convert-xml-to-array-in-php-xml2array/) and is restructured and functionalities are fixed a bit.

Installation
------------

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Add the following to the repository section of your composer.json:
```
  {
    "type": "vcs",
    "url": "git://github.com/Uitrix/yii2-xmltoarray.git"
  }
```
and the following to the require section of the composer.json:
```
"uitrix/yii2-xmltoarray": "*"
```

Usage
-----

Once the extension is installed, use it like the following:

export namespace:
```
use uitrix\xmltoarray\XmlConverter;
```

then:
```
$xml = <<<xml
<?xml version="1.0" encoding="UTF-8"?>
<note>
	<to>Tove</to>
	<from>Jani</from>
	<heading>Reminder</heading>
	<body>Don't forget me <hl>this weekend!</hl></body>
</note>
xml;
		$conv = new XmlConverter($xml);
		$array = $conv->createArray();
		var_export($array);
```

Result of the execution of such a code will be:<commit_msg>Update readme install instructions<commit_after>XmlConverter
=========
Small class converting xml to associative array

This class is based on the work of <NAME> (original code: http://www.lalit.org/lab/convert-xml-to-array-in-php-xml2array/) and is restructured and functionalities are fixed a bit.

Installation
------------

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Add the following to the repository section of your composer.json:
```
  {
    "type": "vcs",
    "url": "git://github.com/Uitrix/xmltoarray.git"
  }
```
and the following to the require section of the composer.json:
```
"uitrix/xmltoarray": "*"
```

Usage
-----

Once the extension is installed, use it like the following:

export namespace:
```
use uitrix\xmltoarray\XmlConverter;
```

then:
```
$xml = <<<xml
<?xml version="1.0" encoding="UTF-8"?>
<note>
	<to>Tove</to>
	<from>Jani</from>
	<heading>Reminder</heading>
	<body>Don't forget me <hl>this weekend!</hl></body>
</note>
xml;
		$conv = new XmlConverter($xml);
		$array = $conv->createArray();
		var_export($array);
```

Result of the execution of such a code will be:
{'fraction_non_alphanumeric': 0.1665943600867679, 'fraction_numerical': 0.004338394793926247, 'mean_word_length': 4.240909090909091, 'pattern_counts': {'":': 6, '<': 37, '<?xml version=': 2, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 22}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3416561', 'n_tokens_mistral': 785, 'n_tokens_neox': 748, 'n_words': 228}