xml-flow icon indicating copy to clipboard operation
xml-flow copied to clipboard

Breaking change in 1.0.3?

Open jishi opened this issue 4 years ago • 0 comments

All of a sudden, this library will parse an XML with a single attribute and flatten it. Meaning, if I have an XML node with something like:

<AVTransportURI val="x-rincon:RINCON_B8E90000000001400"/>

The end object has changed to being { AVTransportURI: "x-rincon:RINCON_B8E90000000001400"/>" }

Instead of previously { AVTransportURI: { val: "x-rincon:RINCON_B8E90000000001400"/>" } }

Do you have any idea why that is? The underlying sax lib hasn't changed, so I'm assuming it is some change you've made, and I see that there is now a tryGuttingNode which basically explode a single property node directly. Is that really the behavior you want? Doesn't become very futureproof when a single change to the xml (adding an attribute) would make the consumer explode...

I was also expecting the option simplifyNodes: false to bypass this behavior, but it still replaces the node with the attribute value.

jishi avatar Jul 05 '19 14:07 jishi