开发者

Add an attribute using xmllint

开发者 https://www.devze.com 2023-03-14 11:05 出处:网络
I want to add an at开发者_如何学Gotribute 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”.

I want to add an at开发者_如何学Gotribute 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

0

精彩评论

暂无评论...
验证码 换一张
取 消