You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I have an XML file in which the ordering of the elements is important. When I translate it to Json, I'd like to get the elements in a single list. Is there a way to do this in xq? I can't quite figure out a way.
In the actual document the item attribute representing the order is not present and its only the order in the XML schema that controls the order that the elements should be processed in.
This is great and expected, but my particular use case uses the element name to distinguish only slight differences in element contents and I need to preserve the order between all a and b elements so I can process them all in order.
Is there a way to represent this in xq output?
The text was updated successfully, but these errors were encountered:
Hi, sorry I have no idea how to do this. We use xmltodict (https://github.com/martinblech/xmltodict) to transform XML to JSON, and I'm not aware of a way to do this in xmltodict. If you're able to demonstrate a way to do this in that library, it's possible we could add a configuration option for that.
Yeah, I figured it was something like that and seems like a common pattern. I really appreciate the response. I'll keep my eye open if I find anything fun I'll post back.
Thanks for the great utility!
Hi,
I have an XML file in which the ordering of the elements is important. When I translate it to Json, I'd like to get the elements in a single list. Is there a way to do this in xq? I can't quite figure out a way.
For example, in the file
In the actual document the item attribute representing the order is not present and its only the order in the XML schema that controls the order that the elements should be processed in.
xq generates this output for this input:
This is great and expected, but my particular use case uses the element name to distinguish only slight differences in element contents and I need to preserve the order between all a and b elements so I can process them all in order.
Is there a way to represent this in xq output?
The text was updated successfully, but these errors were encountered: