zach-m / jonix

Commercial-grade library for extracting data from ONIX sources
Apache License 2.0
57 stars 17 forks source link

AudienceRange overriding Precision and Value elements if more than one are present. #2

Closed 88keys closed 8 years ago

88keys commented 8 years ago

I noticed when processing an AudienceRange element with two AudienceRangePrecision and AudienceRangeValue elements (for example: From: 4 To: 9) the second set of elements will override the first set when being added to the Product (Only To 9 will show up in the AudienceRange object and not From 4).

I've only recently started using the library so I'm not sure if this is user error.

Here is an example (the bottom b075(04) and b076 (9) tags will override the top tags (03 and 4):

<audiencerange>
    <b074>11</b074>
    <b075>03</b075>
    <b076>4</b076>
    <b075>04</b075>
    <b076>9</b076>
</audiencerange>
zach-m commented 8 years ago

Thanks for pointing this out. Indeed <AudienceRange> has a unique structure in ONIX. Fixed in commit 9d744559bbdc473540f1f69da0c985947c20563d, will become available in v3.1.