summaryrefslogtreecommitdiffstats
path: root/inspector/virt-inspector.pod
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-08-27 17:53:03 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-08-27 17:53:03 +0100
commitbaefb8225c8cbde56a1637c17af5c0965a81060e (patch)
tree780a025bbb1e035abc4c23a45f51d106daa594af /inspector/virt-inspector.pod
parentf0f3e1621180724e0a907a30ff5dea9695ddead0 (diff)
downloadlibguestfs-baefb8225c8cbde56a1637c17af5c0965a81060e.tar.gz
libguestfs-baefb8225c8cbde56a1637c17af5c0965a81060e.tar.xz
libguestfs-baefb8225c8cbde56a1637c17af5c0965a81060e.zip
inspector: Use xmlstarlet instead of xpath in examples.
Diffstat (limited to 'inspector/virt-inspector.pod')
-rwxr-xr-xinspector/virt-inspector.pod20
1 files changed, 12 insertions, 8 deletions
diff --git a/inspector/virt-inspector.pod b/inspector/virt-inspector.pod
index 54968279..df9dfdad 100755
--- a/inspector/virt-inspector.pod
+++ b/inspector/virt-inspector.pod
@@ -329,22 +329,25 @@ installer, or one part of a multipart CD. For example:
=head1 USING XPATH
-You can use the XPath query language, and/or the xpath tool, in order
-to select parts of the XML.
+You can use the XPath query language to select parts of the XML. We
+recommend using C<xmlstarlet> to perform XPath queries from the
+command line.
For example:
- $ virt-inspector -d Guest | xpath //filesystems
- Found 1 nodes:
- -- NODE --
+ $ virt-inspector -d Guest | xmlstarlet sel -t -c '//filesystems'
<filesystems>
<filesystem dev="/dev/vg_f13x64/lv_root">
<type>ext4</type>
- [etc]
+ [...]
$ virt-inspector -d Guest | \
- xpath "string(//filesystem[@dev='/dev/sda1']/type)"
- Query didn't return a nodeset. Value: ext4
+ xmlstarlet sel -t -c "string(//filesystem[@dev='/dev/sda1']/type)"
+ ext4
+
+ $ virt-inspector -d Guest | \
+ xmlstarlet sel -t -v '//icon' | base64 -i -d | display -
+ [displays the guest icon, if there is one]
=head1 SHELL QUOTING
@@ -380,6 +383,7 @@ L<guestfs(3)>,
L<guestfish(1)>,
L<http://www.w3.org/TR/xpath/>,
L<base64(1)>,
+L<xmlstarlet(1)>,
L<http://libguestfs.org/>.
=head1 AUTHORS