XMLStarlet – Process XML at the Command Line
XMLStarlet is an open source command-line utility to format, transform, fix, and edit XML using a set of simple commands.
Start by downloading the code (source or binary) here. Once configured and installed, XMLStarlet is available using the xml command, with options to list the current directory in XML, delete nodes that match an XPath pattern, alter element names, validate against a schema, format the output, and much, much more.
You can get started by reading this tutorial, Start Working With XMLStarlet.
Click on the image at right to see an example of a simple session.