CoreOffice / XMLCoder

Easy XML parsing using Codable protocols in Swift
https://coreoffice.github.io/XMLCoder/
MIT License
797 stars 109 forks source link

XMLChoiceCodingKey In conjunction with an attribute #237

Closed henkvanderspek closed 2 years ago

henkvanderspek commented 2 years ago

Hi, great library. Many thanks 🙌 One thing I can't get to work. A choice element with support for an attribute. If I add an attribute to the choice and the xml, it's always ignored by the decoder.

<root id="100">
  <int>5</int>
  <string>foo</string>
  <int>6</int>
  <string>bar</string>
</root>
henkvanderspek commented 2 years ago

Never mind. I looked at the wrong level for the property 🤦