Skip to content

SergioFloresG/xml-to-array-schema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xml-to-array-schema

Convert xml document to associative array.

The function automatically detects the schematic of the document and uses it to format the elements that may appear more than once in an index array.

If it is not possible to detect the scheme, it generates an array of those elements that appear more than once in the form of an indexed array.

composer require mrgenis/xml-to-array-schema

Example

  • \DomDocument
  • \SimpleXMLElement
  • string
$data = \MrGenis\Library\XmlToArray::convert($xml);