Re: [xml] path with xmllint



John Davis, 14.11.2011 15:55:
Not sure if this is the right place to ask, but I am using the
xmllint.exe for windows.  I've noticed that queries which use
conditionals do not work.  I am not sure if this is a limitation with
the dos shell or the syntax of xmllint.

I've tried:
xmllint Foo.xml --xpath /XXX/(one|two)/YYY
and it chokes on the "|".
xmlint Foo.xml --xpath /XXX/one/YYY
and
xmlint Foo.xml -xpath /XXX/two/YYY
work.

The DOS shell. You need to quote your parameters, as in

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

Stefan



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