goxpath

command module
v0.0.0-...-a5bd4a9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2016 License: GPL-2.0 Imports: 8 Imported by: 0

README

goxpath

Build Status Issue Count

Stupid thing to make xpath queries easier from bash. Try a quick google for bash xpath and you might be disappointed. #wahwahwah

NB - due to dependence on gokogiri, you need to install libxml2-devel to build this. (Sorry, I'm still a bit of a golang n00b. 😊)

It'll read from stdin by default

Install

yum install libxml2-devel     # see above, soz
go get github.com/boyvinall/goxpath

Examples

./goxpath -xmlns foo:http://foo -xmlns bar:http://bar -xpath //foo:stuff/bleh -file file.xml

./gopath -h    # NB: see ENV names e.g. $XP_XMLNS

curl -s http://example.com/doc.xml | goxpath -xpath //example

export XP_XMLNS=foo:http://foo,bar:http://bar # define in the ENV, separate with comma
goxpath -xpath //foo:stuff file.xml

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL