Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attributes not always included in final hash #107

Open
ArnoldMEDLINQ opened this issue Nov 26, 2024 · 0 comments
Open

Attributes not always included in final hash #107

ArnoldMEDLINQ opened this issue Nov 26, 2024 · 0 comments

Comments

@ArnoldMEDLINQ
Copy link

ArnoldMEDLINQ commented Nov 26, 2024

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?

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

No branches or pull requests

1 participant