On Thu, Apr 23, 2015 at 8:04 PM, Andrew Pennebaker <andrew.penneba...@gmail.com> wrote: > When I try to hand xmlstarlet the same XPATH query syntax I use in Chrome > and Firefox, xmlstarlet never seems to find any results.
FYI, xmlstarlet uses libxml and libxslt, but a separate project (unlike xmllint which comes with libxml), hosted on Sourceforge: http://sourceforge.net/projects/xmlstar/. > Is there a document > detailing the idiosyncrasies of xmlstarlet XPATH vs WebKit XPATH, so that I > know how to convert my browser queries into xmlstarlet-compatible queries? I think both xmlstarlet (via libxml) and WebKit purport to implement http://www.w3.org/TR/xpath/, so there should be no serious deviations. While xmllint provides an --xpath option which take only an XPath query, xmlstarlet takes XPath queries as parts of other somewhat more complicated options, so there are more things to get wrong. The most common reason for XPaths not matching is the namespace thing, see http://xmlstar.sourceforge.net/doc/UG/ch05.html _______________________________________________ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml