I have been trying to to add new elements to an XML file.
Original file:
<levela>
<levelb>
</levelb>
</levela>
I'm trying to get the following result:
<levela>
<levelb>
<levelc>
<element1>value1</element1>
<element2>value2</element2>
<element3>value3</element3>
</levelc>
</levelb>
</levela>
My current attempt is:
xmlstarlet ed -a /levela/lelvelb -t elem -n levelc -v "" \
-i //levelc -t elem -n "element1" -v "value1" \
file.xml
But my file isn't updated.