xml-get
Command line program to get values from xml using lodash.get paths.
usage
Given a the xml file below, you can get values like:
$ npx xml-get planes_for_sale.ad[0].year ./test/fixtures/one.xml 1977 # output json, can be piped into jq $ npx xml-get planes_for_sale.ad[0].year ./test/fixtures/one.xml json | jq ."1977" $ npx xml-get planes_for_sale.ad[1].location.state ./test/fixtures/one.xml Missouri $ cat ./test/fixtures/one.xml | npx xml-get planes_for_sale.ad[0].color Light blue and white
xml file
1977 &c; Skyhawk Light blue and white New paint, nearly new interior, 685 hours SMOH, full IFR King avionics 23,495 Skyway Aircraft Rapid City, South Dakota 1965 &p; Cherokee Gold 240 hours SMOH, dual NAVCOMs, DME, new Cleveland brakes, great shape John Seller St. Joseph, Missouri