Skip to content

Instantly share code, notes, and snippets.

@Alexintosh
Created July 26, 2017 09:41
Show Gist options
  • Save Alexintosh/7468d70fe0d35bd99cabf5555b1226d3 to your computer and use it in GitHub Desktop.
Save Alexintosh/7468d70fe0d35bd99cabf5555b1226d3 to your computer and use it in GitHub Desktop.
Parse cordova config.xml from shell easily using xmllint --xpath
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="com.app.my" version="2.0.0" xmlns="http://www.w3.org/ns/widgets">
<name>App BETA</name>
<description>app</description>
</widget>
xmllint --xpath "//*[local-name()='widget']/*[local-name()='name']/text()" config.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment