Re: [xml] Which XPATH syntax does xmlstarlet support?

On Thu, Apr 23, 2015 at 8:04 PM, Andrew Pennebaker
<andrew pennebaker 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:

                                                         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, 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

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]