[Ilugc] Best way to access an xml from shell

  • From: mehul.n.ved@xxxxxxxxx (Mehul Ved)
  • Date: Tue Jun 1 13:17:53 2010

On Tue, Jun 1, 2010 at 12:48 PM, sivakumar <sivakumar@xxxxxxxxxx> wrote:

Hi,

Can you suggest me the best option to parse an xml from shell ?

Here is some history on why I need this. I have a installer where I use
yum/zypper for downloading(just download) the packages to be installed
along with its dependencies. I have encountered situations where the
downloads at times fail due to network outages and it is not captured by
the package managers. Both yum/zypper use the same infrastructure at the
server end and the client downloads the header file (primary.xml.gz)
from the server and uses it for its dependency mapping. primary.xml.gz
has the checksum info of the files being downloaded. The above request
is to read this xml file to get the checksum value which can be
validated with the downloaded file.

Is this what you want?
zgrep checksum /path/to/filename.xml.gz

Other related posts: