I have a xml file in a particular directory now I want to remove a particular entry (see example) from the file and update the existing xml file using shell script.
Example: (See code) I have to remove line 4 (entry of a particular resource)
<?xml version="1.0" encoding="UTF-8"?>
<manifest:manifest xmlns:manifest="....." manifest:version="1.2">
<manifest:file-entry manifest:full-path="/" manifest:version="1.2" manifest:media-type="..."/>
"line to be deleted" <manifest:file-entry manifest:full-path="...." manifest:media-type="..."/>
......some more lines....
</manifest:manifest>
Help will be appreciated :)
I am new at this and not much aware about editing a xml file, from some sources I have found that xmllint can be used but I am not sure about that.
greporsed, since XML is not flat, but the question doesn't make it clear what exactly you want to remove (other than that it is amanifest:file-entrytag). What are the criteria?