The following code works fine from a bash script ( ./test.sh ):

export test=$(xmllint --xpath 
'string(//*[local-name()="widget"]/@androidversionCode)' config.xml)

echo $test


How do I put it into Jenkins "execute shell" command? There is either some 
syntax problem or it returns an empty string.  I would like to get the 209, 
just like in the command line.


The config.xml looks something like:

<?xml version='1.0' encoding='utf-8'?>

<widget id="com.example.application" version="1.2.8" 
androidversionCode="209" iosCFBundleVersion="209" 
xmlns="http://www.w3.org/ns/widgets"; 
xmlns:cdv="http://cordova.apache.org/ns/1.0";>

    <name>Application name</name>

    <description>Application description</description>

</widget>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c294f338-8b11-4ccc-94b0-6a117c8ddefb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to