How to rename, in an XML file, specific tags that are embedded in some other specific tags
4
votes
1
answer
915
views
What is the xmlstarlet command to replace a tag value by another one, only for specified tags embedded in other specified tags?
Example: searching every occurance of the tag
b
, that needs to be replaced by d
only if it is within the ...
tag (inside other tags):
* Input example:
This is an example. This is a test;
* Desired output:
This is an example. This is a test;
This post is related to https://unix.stackexchange.com/q/700179/523366 in the solution I am trying to find to format xml files.
Asked by Matt5
(87 rep)
May 6, 2022, 12:05 PM
Last activity: May 6, 2022, 12:20 PM
Last activity: May 6, 2022, 12:20 PM