I'm able to add a new node with a custom fixed value to my XML file in this way, with xmlstarlet :
xmlstarlet ed --subnode "/legge190/data/lotto" --type elem -n newsubnode \
-v "myvalue"
But how to add a unique identifier?
If I try to add a unique identifier using
generate-id(.)
xmlstarlet ed --subnode "/legge190/data/lotto" --type elem -n newsubnode \
-v "generate-id(.)"
I do not have an id value, but the generate-id(.)
string.
Thank you
Asked by aborruso
(2995 rep)
Sep 24, 2017, 03:42 PM
Last activity: Jul 23, 2024, 10:45 AM
Last activity: Jul 23, 2024, 10:45 AM