Re: [xml] path with xmllint

* John Davis wrote:
On Mon, Nov 14, 2011 at 9:57 AM, Alex Bligh <alex alex org uk> wrote:
how about

xmllint Foo.xml --xpath "/XXX/(one|two)/YYY"

Sadly, no.  It says XPath error : Invalid expression with the caret
symbol beneath the first Parenthesis.

That is because you have an invalid expression, at least in XPath 1.0
which is all that libxml2 supports at this point, you cannot use the
syntax above, you would have to use, say, a node test with a predicate
like in `*[self::one or self::two]` for instance. See the definition
Björn Höhrmann · mailto:bjoern hoehrmann de ·
Am Badedeich 7 · Telefon: +49(0)160/4415681 ·
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · 

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