Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
xmllintを使用して、タグに属性を追加したいと考えています。xmllint を使用してこれを行うことはできますか?
XmllintはXMLを編集するように作られていないので、答えは「いいえ、できません」だと思います。
XMLを編集するには、XMLStarletを使用できます。既存のXMLドキュメントに属性を追加する構文は次のとおりです。
xmlstarlet ed -L -i xpath -t attr -n name -v value file