Right now unknown elements are handled three inconsistent ways: namespaced elements become the recursive ext.Extension tree, non-namespaced ones on items go into Item.Custom map[string]string (flat, drops nesting and attributes, see #203), and unknown elements at feed root are Skipped and lost.
Consolidate to a single arbitrary-element tree: everything that isn't a known element (namespaced or not, at any level) parses into one ext.Extension-style structure that preserves nesting, attributes, and repetition, with ergonomic accessors (GetValue("a","b") etc.).
This can land in v1 additively: build the tree into a new field and keep Item.Custom as a shim populated from it (leaf text for simple elements, so existing reads are unchanged; nested elements stop corrupting). Removing Item.Custom outright is the only breaking part, and that can wait for a future v2.
Most of this already exists on the v2-custom-elements branch. This tracks finishing and landing it, plus fixing parseExtensionElement while we're in there (the O(n^2) value concat and the raw loop from #9).
Related: #82, #203, #205.
Right now unknown elements are handled three inconsistent ways: namespaced elements become the recursive
ext.Extensiontree, non-namespaced ones on items go intoItem.Custom map[string]string(flat, drops nesting and attributes, see #203), and unknown elements at feed root are Skipped and lost.Consolidate to a single arbitrary-element tree: everything that isn't a known element (namespaced or not, at any level) parses into one
ext.Extension-style structure that preserves nesting, attributes, and repetition, with ergonomic accessors (GetValue("a","b")etc.).This can land in v1 additively: build the tree into a new field and keep
Item.Customas a shim populated from it (leaf text for simple elements, so existing reads are unchanged; nested elements stop corrupting). RemovingItem.Customoutright is the only breaking part, and that can wait for a future v2.Most of this already exists on the
v2-custom-elementsbranch. This tracks finishing and landing it, plus fixingparseExtensionElementwhile we're in there (theO(n^2)value concat and the raw loop from #9).Related: #82, #203, #205.