title: Get a specific attribute from XML file using Ansible xml module
body: <p>I have an XML file as below</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
  &lt;plist version="1.0"&gt;
  &lt;dict&gt;
      &lt;key&gt;CFBundleExecutable&lt;/key&gt;
      &lt;string&gt;p4v&lt;/string&gt;
      &lt;key&gt;CFBundlePackageType&lt;/key&gt;
      &lt;string&gt;APPL&lt;/string&gt;
      &lt;key&gt;CFBundleShortVersionString&lt;/key&gt;
      &lt;string&gt;2018.2&lt;/string&gt;
      &lt;key&gt;CFBundleVersion&lt;/key&gt;
      &lt;string&gt;2018.2/1666551&lt;/string&gt;
      &lt;key&gt;CFBundleGetInfoString&lt;/key&gt;
      &lt;string&gt;2018.2, Copyright 2018 Perforce Software, Inc.&lt;/string&gt;
      &lt;key&gt;CFBundleIconFile&lt;/key&gt;
      &lt;string&gt;application.icns&lt;/string&gt;
      &lt;key&gt;P4RevString&lt;/key&gt;
      &lt;string&gt;P4V/MACOSX1013X86_64/2018.2/1666551 (2018/05/30)&lt;/string&gt;
      &lt;key&gt;NSPrincipalClass&lt;/key&gt;
      &lt;string&gt;NSApplication&lt;/string&gt;
      &lt;key&gt;NSHighResolutionCapable&lt;/key&gt;
      &lt;string&gt;True&lt;/string&gt;
      &lt;key&gt;CFBundleName&lt;/key&gt;
      &lt;string&gt;P4V&lt;/string&gt;
      &lt;key&gt;CFBundleSignature&lt;/key&gt;
      &lt;string&gt;P4VC&lt;/string&gt;
      &lt;key&gt;CFBundleIdentifier&lt;/key&gt;
      &lt;string&gt;com.perforce.p4v&lt;/string&gt;
  &lt;/dict&gt;
  &lt;/plist&gt;
  </code></pre>
  
  <p>How can I get the string <code>2018.2</code> for key <code>CFBundleShortVersionString</code>?</p>
  
  <p>I have tried something like below but its listing all string values instead of one matching the provided key.</p>
  
  <pre><code> - xml:
        path: /Applications/p4v.app/Contents/Info.plist
        xpath: /plist/dict[starts-with(key,'CFBundleShortVersionString')]/string
        attribute: CFBundleShortVersionString
        content: 'text'
     register: p4v_version
  </code></pre>
  
  <p>I think I am providing the wrong xpath here, but I couldn't find the correct one.</p>