elementValue=`cat somefile.xml | python -c 'import sys, xml.etree.cElementTree as et;\
tree = et.parse(sys.stdin); print tree.find("elementValue").text'`
Last active
November 27, 2017 14:56
-
-
Save scips/b45a4506450169398744632f758741f3 to your computer and use it in GitHub Desktop.
Parse Json or Xml with python and return a signle value
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment