Public bug reported: xmlstarlet is failing to match even the simplest xpaths, except for one which matches the root.
$ wget -O BGCCC_2013_100mile.kml http://ridewithgps.com/routes/2778899.kml $ xmlstarlet el BGCCC_2013_100mile.kml kml kml/Document kml/Document/description kml/Document/name kml/Document/Style kml/Document/Style/LineStyle kml/Document/Style/LineStyle/color kml/Document/Style/LineStyle/width kml/Document/Placemark kml/Document/Placemark/description kml/Document/Placemark/name kml/Document/Placemark/visibility kml/Document/Placemark/flyToView kml/Document/Placemark/styleUrl kml/Document/Placemark/LineString kml/Document/Placemark/LineString/extrude kml/Document/Placemark/LineString/tessellate kml/Document/Placemark/LineString/altitudeMode kml/Document/Placemark/LineString/coordinates $ xmlstarlet sel -B -t -m "/" -c . -n BGCCC_2013_100mile.kml # succeeds $ xmlstarlet sel -B -t -m "/kml" -c . -n BGCCC_2013_100mile.kml # fails $ xmlstarlet sel -B -t -m "kml" -c . -n BGCCC_2013_100mile.kml # fails $ xmlstarlet sel -B -t -m "Document" -c . -n BGCCC_2013_100mile.kml #fails Ubuntu 12.04.2 LTS ii xmlstarlet 1.3.0-1 command line XML toolkit ldd /usr/bin/xmlstarlet linux-vdso.so.1 => (0x00007ffff69ff000) libexslt.so.0 => /usr/lib/x86_64-linux-gnu/libexslt.so.0 (0x00007f0af847a000) libxslt.so.1 => /usr/lib/x86_64-linux-gnu/libxslt.so.1 (0x00007f0af823e000) libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007f0af7ee1000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0af7b22000) libgcrypt.so.11 => /lib/x86_64-linux-gnu/libgcrypt.so.11 (0x00007f0af78a4000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0af75a7000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f0af73a3000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f0af718c000) /lib64/ld-linux-x86-64.so.2 (0x00007f0af86c6000) libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f0af6f87000) ProblemType: Bug DistroRelease: Ubuntu 12.04 Package: xmlstarlet 1.3.0-1 ProcVersionSignature: Ubuntu 3.5.0-18.29-generic 3.5.7 Uname: Linux 3.5.0-18-generic x86_64 ApportVersion: 2.0.1-0ubuntu17.3 Architecture: amd64 CheckboxSubmission: 1e1a99f31ec2933306456e1f141c45d8 CheckboxSystem: edda5d4f616ca792bf437989cb597002 Date: Fri Sep 13 18:51:48 2013 InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1) MarkForUpload: True ProcEnviron: LANGUAGE=en_US:en TERM=xterm PATH=(custom, no user) LANG=en_US.UTF-8 SHELL=/bin/bash SourcePackage: xmlstarlet UpgradeStatus: Upgraded to precise on 2013-03-03 (194 days ago) ** Affects: xmlstarlet (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug precise running-unity -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1225227 Title: xpath matching fails to match anything but root To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xmlstarlet/+bug/1225227/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs