Re: [xsl] Need XML grep-like tool for Linux that uses XPath expressions

Subject: Re: [xsl] Need XML grep-like tool for Linux that uses XPath expressions
From: Peter Flynn <pflynn@xxxxxx>
Date: Tue, 11 Oct 2011 13:49:51 +0100
On 11/10/11 00:00, Lynn Murdock wrote:
> Hi-
> 
> I need to run some complex searches on a directory containing
> multiple XML files, and am looking for a command-line tool that will
> take XPath expressions and will work in Unix/Linux terminal
> applications. Does anyone on this list have suggestions for a good
> tool?

lxgrep and lxprintf from the LTxml2 toolset at
http://www.ltg.ed.ac.uk/software/ltxml2

$  find /var/www/xml/doc/docs -type f -name '*.xml' -exec lxprintf -e
'articleinfo' '<doctitle>%s</doctitle>\n' 'descendant::title' {}
2>/dev/null \;
<doctitle>Student mailing lists sign-up application</doctitle>
<doctitle>How to avoid a Spam-filled Inbox</doctitle>
<doctitle>Web Site Owner's Guide</doctitle>
<doctitle>RSS Feeds</doctitle>
<doctitle>Tips on using Email effectively</doctitle>
$

///Peter

Current Thread