Linux Commands Examples

A great documentation place for Linux commands


a script to query XPath statements in XML documents.


xpath [-s suffix] [-p prefix] [-q] -e query [-e query] ... [file] ...

add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!


no example yet ...

... Feel free to add your own example above to help other Linux-lovers !


xpath uses the XML::XPath perl module to make XPath queries to any XML document. The XML::XPath module aims to comply exactly to the XPath specification at "" and yet allows extensions to be added in the form of functions.

The script takes any number of XPath pointers and tries to apply them to each XML document given on the command line. If no file arguments are given, the query is done using "STDIN" as an XML document.

When multiple queries exist, the result of the last query is used as context for the next query and only the result of the last one is output. The context of the first query is always the root of the current document.


Be quiet. Output only errors (and no separator) on stderr.

-s suffix
Place "suffix" at the end of each entry. Default is a linefeed.

-p prefix
Place "prefix" preceding each entry. Default is nothing.


The author of this man page is not very fluant in english. Please, send him (fabien[:at:]tzone[:dot:]org) any corrections concerning this text.

See also XML::XPath(3pm).


This module is copyright 2000 Fastnet Software Ltd. This is free software, and as such comes with NO WARRANTY . No dates are used in this module. You may distribute this module under the terms of either the Gnu GPL , or under specific licencing from Fastnet Software Ltd. Special free licencing consideration will be given to similarly free software. Please don’t flame me for this licence - I’ve put a lot of hours into this code, and if someone uses my software in their product I expect them to have the courtesy to contact me first.

Full support for this module is available from Fastnet Software Ltd on a pay per incident basis. Alternatively subscribe to the Perl-XML mailing list by mailing lyris[:at:]activestate[:dot:]com with the text:

        SUBSCRIBE Perl-XML

in the body of the message. There are lots of friendly people on the list, including myself, and we’ll be glad to get you started.

Matt Sergeant, matt[:at:]sergeant[:dot:]org

This man page was added as well as some serious modifications to the script by Fabien Ninoles <fabien[:at:]debian[:dot:]org> for the Debian Project.

see also


How can this site be more helpful to YOU ?

give  feedback