X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;ds=inline;f=inspector%2Fvirt-inspector.pod;h=04e421dc3b1e34c18070cdb423f2a1912e813289;hb=3bde9fdffdb74183f7bf1315eb402918d3b13ed1;hp=54968279a7fe54cec231920d905bcb52fe9ff9dc;hpb=f0f3e1621180724e0a907a30ff5dea9695ddead0;p=libguestfs.git
diff --git a/inspector/virt-inspector.pod b/inspector/virt-inspector.pod
index 5496827..04e421d 100755
--- a/inspector/virt-inspector.pod
+++ b/inspector/virt-inspector.pod
@@ -132,6 +132,13 @@ Display version number and exit.
Enable tracing of libguestfs API calls.
+=item B<--xpath> query
+
+Perform an XPath query on the XML on stdin, and print the result on
+stdout. In this mode virt-inspector simply runs an XPath query; all
+other inspection functions are disabled. See L below
+for some examples.
+
=back
=head1 OLD-STYLE COMMAND LINE ARGUMENTS
@@ -327,24 +334,35 @@ installer, or one part of a multipart CD. For example:
installer
-=head1 USING XPATH
+=head1 XPATH QUERIES
+
+Virt-inspector includes built in support for running XPath queries.
+The reason for including XPath support directly in virt-inspector is
+simply that there are no good and widely available command line
+programs that can do XPath queries. The only good one is
+L and that is not available on Red Hat Enterprise
+Linux.
-You can use the XPath query language, and/or the xpath tool, in order
-to select parts of the XML.
+To perform an XPath query, use the I<--xpath> option. Note that in
+this mode, virt-inspector simply reads XML from stdin and outputs the
+query result on stdout. All other inspection features are disabled in
+this mode.
For example:
- $ virt-inspector -d Guest | xpath //filesystems
- Found 1 nodes:
- -- NODE --
+ $ virt-inspector -d Guest | virt-inspector --xpath '//filesystems'
ext4
- [etc]
+ [...]
+
+ $ virt-inspector -d Guest | \
+ virt-inspector --xpath "string(//filesystem[@dev='/dev/sda1']/type)"
+ ext4
$ virt-inspector -d Guest | \
- xpath "string(//filesystem[@dev='/dev/sda1']/type)"
- Query didn't return a nodeset. Value: ext4
+ virt-inspector --xpath 'string(//icon)' | base64 -i -d | display -
+ [displays the guest icon, if there is one]
=head1 SHELL QUOTING
@@ -380,6 +398,7 @@ L,
L,
L,
L,
+L,
L.
=head1 AUTHORS
@@ -412,4 +431,4 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.