After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 740827 - xmllint feature request: display Xpath query output with an output line separator
xmllint feature request: display Xpath query output with an output line separ...
Status: RESOLVED FIXED
Product: libxml2
Classification: Platform
Component: xmllint
git master
Other All
: Normal enhancement
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2014-11-27 23:04 UTC by Gilles Quenot
Modified: 2020-06-25 01:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Gilles Quenot 2014-11-27 23:04:48 UTC
Hi,

I wonder why unlike the xmlstarlet shell tool, xmllint from libxml2 don't display Xpath querys results with newlines.

I think it would be a great feature to have a switch to choose our own output separator instead of making modification for legacy retro compatibility purposes.

It will be very handy to feed shell array, like this :

result=( $(xmllint --xpath '/a/@href' file) )

There's AFAIK no way today to do so in a proper way.

Thanks, Gilles Quenot.
Comment 1 Gilles Quenot 2018-03-23 12:17:19 UTC
Workaround : https://github.com/sputnick-dev/xmllint/blob/master/xmllint
Comment 2 Gilles Quenot 2018-04-01 05:24:13 UTC
Fixed some bugs in the wrapper, now seems to work well