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
For the record, comments placed above the map key like that are on the map key node, not the value. You'll need to use triple dots ... or the key operator to select them
Version of yq: 4.30.2
Operating system: linux
Installed via: binary release
Bug description
Comments in XML are parsed with type == "!!null".
Order of comments and nodes are not stable.
Input
Undefined type for comments
yq --input-format xml '.. | type' input.xml
Output
The order of comment and root node are swapped
yq --input-format xml '.' input.xml
Output
It is not possible to select the comments for further processing
yq --input-format xml '.. | select(type == "!!null")' input.xml
The command produces no output.
The comment is selected together with the map
yq --input-format xml '.. | select(type == "!!map")' input.xml
Output
The text was updated successfully, but these errors were encountered: