Skip to content

xml undefined @attributes #5

Description

@Notmarrco

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions