Skip to content

Attributes not always included in final hash #107

@ArnoldMEDLINQ

Description

@ArnoldMEDLINQ

Given this simple minimal example:

<data>
  <test1 attr1="a1"/>
  <test2 attr1="a1">
    <id>myId</id>
  </test2>
  <test3 attr="a1">content</test3>
</data>

The output is:
{"data"=>{"test1"=>{"@attr1"=>"a1"}, "test2"=>{"id"=>"myId", "@attr1"=>"a1"}, "test3"=>"content"}}

The attribute of the tag test3 is missing. I believe this to be an error. Especially as many XML standards exspect this attributes to be used. E.G. the new XRechnung (en16931) declares many attributes this way. Is there a possibility to include the attributes of tags with content but without further tags inside them into the hash?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions