Re: [xml] path with xmllint
- From: Bjoern Hoehrmann <derhoermi gmx net>
- To: John Davis <davisjf gmail com>
- Cc: xml gnome org
- Subject: Re: [xml] path with xmllint
- Date: Mon, 14 Nov 2011 16:14:26 +0100
* 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
<http://www.w3.org/TR/xpath/#NT-Step>.
--
Björn Höhrmann · mailto:bjoern hoehrmann de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]