import-engine icon indicating copy to clipboard operation
import-engine copied to clipboard

xml undefined @attributes

Open Notmarrco opened this issue 7 years ago • 0 comments

Hi, I'm trying to use the importer with a XML file, but I get the following error :

[Symfony\Component\Debug\Exception\ContextErrorException]  
  Notice: Undefined index: @attributes                       
                                                             
Exception trace:
 () at [...]vendor/mathielen/import-engine/src/Mathielen/DataImport/Reader/XmlReader.php:36

so the issue seems to be there : https://github.com/mathielen/import-engine/blob/master/src/Mathielen/DataImport/Reader/XmlReader.php#L36 (notice the TODO label :) ), but I can't figure out why it doesn't work.

When I dump the SimpleXMLIterator $this->iterableResult I can see '@attributes' but I can't access them, and in fact even if I could that would only be some attributes on my first xml tag, but it wouldn't return the list of the xml fields .

thanks

Notmarrco avatar Apr 18 '17 15:04 Notmarrco