I want to add an attribute to the tag, using xmllint. Can I do this is through xmllint?
Xmllint in not made to edit XML, so I think the answer is “no, you can't”.
To edit XML, you can use XMLStarlet, the syntax to add an attribute into existing XML document is:
xmlstarlet ed -L -i xpath -t attr -n name -v value file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With