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!
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!