Skip to content

Can you merge XML documents with xq? #1639

Closed Answered by infogulch
infogulch asked this question in Q&A
Discussion options

You must be logged in to vote

I think I got it. The translation from xml to json and back is a little odd and I misunderstood it at first, but this works now:

xq -sx '{testsuites: {testsuite: [.[].testsuites.testsuite]}}' file1.xml file2.xml

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by infogulch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant