xml-to-array
                                
                                 xml-to-array copied to clipboard
                                
                                    xml-to-array copied to clipboard
                            
                            
                            
                        formatting XML
Hi,
if I try to import a formatted xml file(with blank spaces, carriage returns) from a form with file upload, your function will give an error.
I managed to fix the issue by adding this before your function:
$stringXml = file_get_contents($fileXml->getRealPath()); $stringXml = preg_replace('/(\>)\s*(\<)/m', '$1$2', str_replace(array("\n", "\r"), "", $stringXml));
It's possible to implement this, or something like this directly in your library? Thanks!
The test suite of this project is totally wrong. It only tests that an XML converted from an array is actually converted back to the same array bu the library.
It doesn't test at all that an XML string is converted to an array successfully.